/* Assets Page Specific Styles */

/* Hidden class for filtered items */
.hidden {
    display: none !important;
}

/* Enhanced Asset Cards */
.asset-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.asset-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    transition: left 0.5s ease;
}

.asset-card:hover::before {
    left: 100%;
}

.asset-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.3);
    border-color: var(--primary-green);
}

/* Category Badges */
.category-badge {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Audio Player Styling */
.audio-player {
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px;
}

.audio-player::-webkit-media-controls-panel {
    background-color: rgba(42, 42, 42, 0.8);
}

.audio-player::-webkit-media-controls-play-button {
    background-color: var(--primary-green);
    border-radius: 50%;
}


/* Download Button Animation */
.download-btn {
    position: relative;
    overflow: hidden;
}

.download-btn:active {
    transform: translateY(6px) scale(0.98);
    box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.4), 0px 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.05s ease-out;
}

.download-btn.downloaded {
    background-color: var(--secondary-yellow);
    box-shadow: 0px 6px 0px var(--secondary-yellow-dark), 0px 8px 12px rgba(0, 0, 0, 0.3);
}

.download-btn.downloaded::after {
    content: '✓ Downloaded!';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-weight: bold;
}

/* Scroll Animations */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-on-scroll.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-green);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 6px 0px var(--primary-green-dark), 0px 8px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease, transform 0.1s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-yellow);
    box-shadow: 0px 6px 0px var(--secondary-yellow-dark), 0px 8px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

.back-to-top:active {
    transform: translateY(6px) scale(0.95);
    box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.4), 0px 1px 2px rgba(0, 0, 0, 0.2);
    background-color: var(--primary-green-dark);
    transition: all 0.05s ease-out;
}

/* Search Input Enhancements */
#searchbar:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Results Count Styling */
#resultsCount {
    font-weight: 500;
}

#visibleCount {
    color: var(--primary-green);
    font-weight: bold;
}

#totalCount {
    color: var(--secondary-yellow);
    font-weight: bold;
}

/* No Results Message */
#noResults {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* List View Specific Styles */
#assetsGrid .asset-card {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
}

#assetsGrid .asset-card > * {
    flex: 1;
}

#assetsGrid .asset-card .audio-player {
    max-width: 300px;
}

#assetsGrid .asset-card .download-btn {
    max-width: 150px;
}

/* Responsive Design */

/* Mobile Menu Button Styles */
#mobileMenuBtn {
    display: block;
    background-color: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

#mobileMenuBtn:hover {
    background-color: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-green);
}

#mobileMenuBtn:active {
    transform: scale(0.95);
    background-color: rgba(76, 175, 80, 0.2);
}

#mobileMenuBtn svg {
    transition: transform 0.2s ease;
}

#mobileNav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobileNav:not(.hidden) {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

@media (min-width: 768px) {
    #mobileMenuBtn {
        display: none !important;
    }

    #mobileNav {
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }

    #mobileNav.hidden {
        display: block !important;
    }
}

/* Mobile devices (up to 640px) */
@media (max-width: 640px) {
    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    #mobileNav ul {
        background-color: var(--header-footer-bg);
        border-radius: 8px;
        padding: 1rem 0;
        margin-top: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    nav ul li {
        margin: 0;
        width: 100%;
    }

    nav ul li a {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
        display: block;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul li:last-child a {
        border-bottom: none;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }

    #assetsGrid .asset-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.25rem;
    }

    #assetsGrid .asset-card .audio-player,
    #assetsGrid .asset-card .download-btn {
        max-width: 100%;
        width: 100%;
    }

    #assetsGrid .asset-card h3 {
        font-size: 1.25rem;
    }

    #assetsGrid .asset-card .text-2xl {
        font-size: 1.5rem;
    }

    .category-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    #searchbar,
    #assetType {
        font-size: 0.95rem;
        padding: 0.75rem;
    }

    #resultsCount {
        font-size: 0.85rem;
    }

    section {
        padding: 2rem 1rem;
    }

    h2 {
        font-size: 2rem;
    }

    #noResults .text-6xl {
        font-size: 3rem;
    }

    #noResults h3 {
        font-size: 1.5rem;
    }

    footer {
        padding: 1.5rem 1rem;
    }

    footer p {
        font-size: 0.9rem;
    }
}

/* Small tablets and mobile landscape (641px to 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    #assetsGrid .asset-card {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }

    #assetsGrid .asset-card .audio-player {
        max-width: 250px;
    }

    #assetsGrid .asset-card .download-btn {
        max-width: 140px;
    }
}

/* Tablet devices (up to 768px) */
@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    #assetsGrid .asset-card {
        flex-direction: column;
        align-items: stretch;
    }

    #assetsGrid .asset-card .audio-player,
    #assetsGrid .asset-card .download-btn {
        max-width: 100%;
    }

    section {
        padding: 2.5rem 1rem;
    }
}

/* Medium devices (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    #assetsGrid .asset-card {
        flex-direction: row;
        align-items: center;
    }

    #assetsGrid .asset-card .audio-player {
        max-width: 280px;
    }

    #assetsGrid .asset-card .download-btn {
        max-width: 145px;
    }

    .container {
        max-width: 90%;
    }
}

/* Large devices (1025px and up) */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
}

/* Header Enhancement */
header {
    backdrop-filter: blur(10px);
    background-color: rgba(40, 40, 40, 0.95);
}

/* Banner/Subtitle responsive */
@media (max-width: 640px) {
    div.bg-\\[\\#222222\\] {
        padding: 0.75rem 1rem !important;
    }

    div.bg-\\[\\#222222\\] p {
        font-size: 0.9rem !important;
    }
}

/* Card Icon Animation */
.asset-card:hover .text-2xl {
    transform: scale(1.2) rotate(5deg);
    transition: transform 0.3s ease;
}

.text-2xl {
    transition: transform 0.3s ease;
    display: inline-block;
}

