/* 
 * Sysis Technology Core Styles
 * Enhanced for SEO, accessibility and performance 
 */

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Ensure proper text contrast for readability and SEO */
.text-gray-400 {
    color: #a0aec0 !important; /* Adjusted for better contrast */
}

/* Improved focus states for accessibility */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #e53e3e !important;
    outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    left: -999px;
    width: 1px;
    height: 1px;
    top: auto;
    overflow: hidden;
}

.skip-to-content:focus {
    color: white;
    background-color: #9b2c2c;
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    overflow: auto;
    margin: 10px;
    padding: 5px;
    font-size: 1.4em;
    z-index: 999999;
    text-decoration: none;
}

/* Enhance link underlines for better visibility */
.main-content a:not(.btn):not(.no-underline) {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Enhance text for readability */
@media (max-width: 640px) {
    body {
        font-size: 1rem;
        line-height: 1.5;
    }
    h1 {
        font-size: 2rem !important;
    }
    h2 {
        font-size: 1.5rem !important;
    }
}

/* Print styles for better SEO */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    /* Expand all URLs for print */
    a:after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }
    
    /* Hide nav and other non-essential elements */
    nav, .footer-menu, .social-links, .hide-print {
        display: none !important;
    }
}

/* Custom focus styles for form fields */
input:focus, textarea:focus, select:focus {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.3) !important;
}

/* Optimize page transitions for better UX */
.page-transition {
    transition: opacity 0.3s ease-in-out;
}

/* Prevent text size adjustments on orientation change */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* CSS variables for consistent theming */
:root {
    --primary-color: #e53e3e;
    --primary-hover: #c53030;
    --text-dark: #1a202c;
    --text-light: #f7fafc;
    --background-dark: #1a202c;
    --background-light: #f7fafc;
}

/* Graceful image loading */
img {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

img.loaded {
    opacity: 1;
}

/* Reduced motion media query for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}