/* Custom overrides and enhancements */

/* Selection color */
::selection {
    background-color: rgba(251, 191, 36, 0.3);
    color: #f5f0f7;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    image-rendering: auto;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

/* Link hover underline animation */
a.hover-underline {
    position: relative;
}

a.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #fbbf24;
    transition: width 0.3s ease;
}

a.hover-underline:hover::after {
    width: 100%;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-bounce {
        animation: none;
    }
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu-btn,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
