/* --- Global Styles & Custom Scrollbar --- */
body {
    /* For Firefox */
    scrollbar-width: thin;
    scrollbar-color: #444444 #1E1E1E;
}

/* For Chrome, Safari, and Opera */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1E1E1E;
}

::-webkit-scrollbar-thumb {
    background-color: #444444;
    border-radius: 10px;
    border: 2px solid #1E1E1E;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #555555;
}


/* --- Full Page Loader Animation --- */
#loader .loader-spinner {
    width: 56px;
    height: 56px;
    border: 6px solid #444;
    border-bottom-color: #b41800; /* Brand color */
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* --- Sidebar & Navigation --- */
.category-link.active {
    background-color: #b41800;
    color: white;
    font-weight: 600;
}
.category-link.active i {
    color: white;
}

/* --- Sub-Category Filter Bar --- */
/* Hide scrollbar but allow scrolling */
#sub-category-bar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
#sub-category-bar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.sub-category-btn.active {
    background-color: #b41800 !important;
    color: white !important;
    border-color: #b41800 !important;
}

/* --- Asset Card --- */
.asset-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: #2D2D2D; /* gray-700 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 16 / 10;
}

.asset-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Card shimmer/skeleton effect */
.shimmer {
    position: absolute;
    inset: 0;
    transform: translateZ(0); /* Promotes to a new layer */
    animation: shimmer-animation 1.5s infinite linear;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.04) 50%, 
        rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
}

@keyframes shimmer-animation {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Card preview elements */
.asset-card .preview-video, .asset-card .preview-image, .asset-card .preview-embed, .asset-card .preview-file {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease-in-out;
}

/* .asset-card .preview-video {
    opacity: 0;
}

.asset-card:hover .preview-video {
    opacity: 1;
} */

/* Card title overlay */
.asset-card .card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

/* --- Responsive Sidebar for Mobile --- */
@media (max-width: 767px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        height: 100vh;
        border-radius: 0;
        box-shadow: 0 0 20px rgba(0,0,0,0.5);
    }

    #sidebar.show {
        transform: translateX(0);
    }
}

/* In assets/css/style.css */

/* --- ADD THIS AT THE END OF THE FILE --- */

/* --- Load More Button --- */
#load-more-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

/* In assets/css/style.css */

/* --- ADD THIS AT THE END OF THE FILE --- */

/* --- Modal Content Loader --- */
.modal-loader {
    width: 48px;
    height: 48px;
    border: 4px solid #444444; /* gray-600 */
    border-bottom-color: #00A9FF; /* brand */
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* --- Definitive Lazy Loading Fix --- */
/* By default, any media element inside a card that is waiting to be lazy-loaded will be invisible. */
.asset-card [data-src] {
  opacity: 0;
  transition: opacity 0.5s ease-in-out; /* Add a smooth fade-in transition */
}