/* Accessibility and Print Styles for Contracting Company Website */

/* Accessibility Improvements */
:root {
    --focus-outline-color: #946317;
    --focus-outline-width: 3px;
    --focus-outline-style: solid;
    --focus-outline-offset: 2px;
}

/* Improved Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: var(--focus-outline-width) var(--focus-outline-style) var(--focus-outline-color) !important;
    outline-offset: var(--focus-outline-offset) !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    z-index: 9999;
    transition: top 0.3s ease;
    border-bottom-right-radius: 5px;
}

.skip-to-content:focus {
    top: 0;
}

/* Improved Contrast */
.text-muted {
    color: #6c757d !important;
}

/* 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;
        scroll-behavior: auto !important;
    }
    
    .animate__animated {
        animation: none !important;
    }
    
    .back-to-top-btn,
    .back-to-top-btn::before,
    .back-to-top-btn::after {
        animation: none !important;
        transition: none !important;
    }
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
    * {
        border-color: currentColor !important;
    }
    
    .btn,
    .nav-link,
    .card,
    .service-card-hexa,
    .stats-card-hexa,
    .hexa-card {
        border: 1px solid currentColor !important;
    }
    
    img {
        border: 1px solid transparent !important;
    }
}

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    header,
    footer,
    .navbar,
    .back-to-top-btn,
    .social-icons,
    .btn,
    .hero-shape-divider,
    .services-shape-divider,
    video,
    audio,
    iframe {
        display: none !important;
    }
    
    /* Ensure content is visible */
    body {
        color: #000 !important;
        background: #fff !important;
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }
    
    /* Ensure links are useful in print */
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }
    
    /* Ensure images are visible */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    /* Improve page breaks */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    p, blockquote, ul, ol, dl, table {
        page-break-inside: avoid;
    }
    
    /* Ensure full width */
    .container,
    .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Improve table display */
    table {
        border-collapse: collapse !important;
    }
    
    table, th, td {
        border: 1px solid #000 !important;
    }
}

/* Screen Reader Only Text */
.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;
}

/* Keyboard Navigation Improvements */
body.keyboard-navigation *:focus {
    outline: var(--focus-outline-width) var(--focus-outline-style) var(--focus-outline-color) !important;
    outline-offset: var(--focus-outline-offset) !important;
}

/* ARIA Improvements */
[aria-hidden="true"] {
    display: none !important;
}

/* Color Contrast Improvements */
.text-white {
    color: #ffffff !important;
}

.bg-dark {
    background-color: #212529 !important;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode-supported {
        background-color: #121212;
        color: #f1f1f1;
    }
    
    .dark-mode-supported a {
        color: #90CAF9;
    }
    
    .dark-mode-supported .card,
    .dark-mode-supported .service-card-hexa,
    .dark-mode-supported .stats-card-hexa,
    .dark-mode-supported .hexa-card {
        background-color: #1E1E1E;
        color: #f1f1f1;
    }
}

/* Font Size Adjustments */
html {
    font-size: 16px;
}

@media (max-width: 767.98px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 1400px) {
    html {
        font-size: 18px;
    }
}