/* ==========================================================================
   TrustInLabs - Custom Layer Overrides & Global Enhancements
   ========================================================================== */

/* Global Selection Style */
::-moz-selection {
    background-color: #38B2AC;
    color: #ffffff;
}
::selection {
    background-color: #38B2AC;
    color: #ffffff;
}

/* Hero Section Fade-In Animation */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-fade-in {
    animation: heroFadeIn 1.2s ease-out forwards;
}

/* Custom Premium Scrollbar Management */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0D1B2A;
}
::-webkit-scrollbar-thumb {
    background: #4FD1C5;
    border-radius: 4px;
    border: 2px solid #0D1B2A;
}
::-webkit-scrollbar-thumb:hover {
    background: #38B2AC;
}

/* Smooth Scroll Section Offset */
section {
    scroll-margin-top: 80px;
}

/* Improve rendering stability on mobile and long pages. */
img {
    max-width: 100%;
    height: auto;
}

/* Base Component Custom Micro-Interactions */
.dropdown-menu {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* Focus Outline Standardization */
input:focus, textarea:focus {
    outline: none;
}

/* Mobile Menu State Transitions */
#mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Performance safeguards for lower-end mobile devices. */
@media (max-width: 768px) {
    .site-header {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background-color: rgba(255, 255, 255, 0.98);
    }

    .transition-all {
        transition-property: opacity, transform, color, background-color, border-color;
        transition-duration: 180ms;
        transition-timing-function: ease;
    }

    [style*="filter: blur("] {
        filter: none !important;
        transform: none !important;
    }
}

/* Respect motion preferences and prevent animation-induced jank. */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-fade-in {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* Printing Optimization Layer */
@media print {
    .site-header, .contact-section, .btn-submit, #menu-btn, #mobile-menu {
        display: none !important;
    }
    body {
        color: #000000;
        background: #ffffff;
    }
}

/* Global expertise highlight (service name) */
.expertise-highlight {
    color: #2EDB2E;
}