/* Additional Responsive Styles and Enhancements */

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1e293b;
        --bg-secondary: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
    }
}

/* Enhanced loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.form-group.loading input,
.form-group.loading textarea {
    background-color: #f8fafc;
    opacity: 0.7;
}

/* Enhanced focus states for accessibility */
input:focus,
textarea:focus,
button:focus,
.nav-link:focus,
.btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #2563eb;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 2000;
}

.skip-link:focus {
    top: 6px;
}

/* Enhanced mobile navigation */
@media (max-width: 768px) {
    .nav-menu {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 0 0 16px 16px;
    }
    
    .nav-menu.active {
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Enhanced hero section for mobile */
@media (max-width: 480px) {
    .hero-content {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Enhanced service cards for better readability */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Enhanced contact form validation styles */
.form-group.error input,
.form-group.error textarea {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-group.success input,
.form-group.success textarea {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .form-error {
    display: block;
}

/* Enhanced search modal */
.search-result {
    border-radius: 8px;
    margin-bottom: 8px;
}

.search-result h4 {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.search-result:last-child {
    border-bottom: none;
}

/* Print styles */
@media print {
    .header,
    .search-btn-float,
    .back-to-top,
    .newsletter,
    #searchModal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .hero {
        padding: 20px 0;
        background: #fff;
    }
    
    .hero-title {
        font-size: 24pt;
        color: #000;
    }
    
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .service-card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #000;
        color: #fff;
    }
    
    .btn-secondary {
        background: #fff;
        border: 2px solid #000;
        color: #000;
    }
    
    .nav-link {
        color: #000;
        font-weight: 600;
    }
    
    .service-card {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-graphic i:hover {
        transform: none;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Enhanced tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-container {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        gap: 3rem;
    }
}

/* Enhanced large screen styles */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .service-card {
        padding: 3rem;
    }
}

/* Smooth scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Selection styling */
::selection {
    background: #2563eb;
    color: white;
}

::-moz-selection {
    background: #2563eb;
    color: white;
}
