@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.4);
    }

    50% {
        box-shadow: 0 0 20px 5px rgba(234, 179, 8, 0.2);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Utility classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

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

/* Scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom easing */
.ease-smooth {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-spring {
    transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
    background: #e5e7eb;
    height: 0.5rem;
    border-radius: 0.375rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    margin-top: -0.375rem;
    background-color: #53565a;
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 50%;
    transition: background-color 0.3s, transform 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background-color: #374151;
    transform: scale(1.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Selection */
::selection {
    background-color: #EAB308;
    color: #53565a;
}

/* Tablet-specific styles */
@media (min-width: 820px) and (max-width: 1023px) {

    /* Optimize touch targets for tablets */
    button,
    a,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    /* Adjust dropdown menus for touch */
    .dropdown-menu {
        min-width: 200px;
    }

    /* Improve spacing for touch interactions */
    .nav-item {
        padding: 0.5rem 0;
    }

    /* Optimize grid layouts for tablets */
    .grid-cols-1.md\:grid-cols-2.tablet\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Adjust padding for better tablet experience */
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    /* Optimize hero section for tablets */
    .hero-section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    /* Adjust card aspect ratios for tablets */
    .card-aspect-tablet {
        aspect-ratio: 4/5;
    }

    /* Improve button sizing for touch */
    .btn-tablet {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    /* Optimize filter buttons for tablets */
    .filter-buttons {
        gap: 1.5rem;
    }

    /* Adjust typography for tablets */
    h1.tablet-text {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    h2.tablet-text {
        font-size: 2rem;
        line-height: 1.3;
    }

    h3.tablet-text {
        font-size: 1.5rem;
        line-height: 1.4;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Show images in color by default on touch devices */
    .img-hover,
    .grayscale {
        filter: grayscale(0) !important;
        opacity: 1 !important;
    }

    /* Show overlays by default */
    .md\:opacity-0 {
        opacity: 1 !important;
    }

    /* Reset transforms for mobile */
    .md\:translate-y-4 {
        transform: translateY(0) !important;
    }

    /* Touch active state */
    .touch-active {
        transform: translateY(-4px);
        transition: transform 0.3s ease;
    }
}