/* ================================
   Custom Animations & Styles
   ================================ */

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Animation Delays */
.animation-delay-100 {
    animation-delay: 0.1s;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

/* Floating Animation */
@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.pulse-subtle {
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Custom Focus Styles for Better Accessibility */
*:focus-visible {
    outline: 3px solid #3B82F6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Hide focus outline on mouse but keep for keyboard */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Text Selection */
::selection {
    background-color: #3B82F6;
    color: white;
}

/* Smooth Transitions */
a, button {
    transition: all 0.2s ease;
}

/* Custom Scrollbar (WebKit browsers) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Accessibility: Reduced Motion */
@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;
    }
}

/* Enhanced Contrast for Better Readability */
@media (prefers-contrast: high) {
    body {
        --tw-text-opacity: 1;
        color: #000000;
    }
    
    .bg-gray-50 {
        background-color: #ffffff;
    }
}

/* Gradient Animation for Hero */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* Button Styles Enhancement */
button, .btn {
    cursor: pointer;
    user-select: none;
}

button:active, .btn:active {
    transform: scale(0.98);
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skip to Content Link (Accessibility) */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: #3B82F6;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 100;
}

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

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    button, .btn {
        border: 2px solid currentColor;
    }
}

/* Print Styles */
@media print {
    header {
        position: static;
    }
    
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .fade-in-up {
        animation-duration: 0.5s;
    }
}
