/* Container Box & Core Structure */
.efg-single-folder-layout {
    width: 100%;
}
.efg-cover-card {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    background: #222;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease;
}
.efg-cover-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}
.efg-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.efg-cover-card:hover .efg-cover-img {
    transform: scale(1.04);
}

/* Elegant Text & Badge Details Panel Overlays */
.efg-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.85) 100%);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
}
.efg-card-badge {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 30px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.efg-card-info {
    color: #ffffff;
}
.efg-card-info h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.efg-card-info p {
    margin: 0;
    font-size: 12px;
    color: rgba(255,255,255,0.75);
}

/* Floating Actions Selector */
.efg-card-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.efg-cover-card:hover .efg-card-actions {
    opacity: 1;
    transform: translateX(0);
}
.efg-action-btn-trigger {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.efg-action-btn-trigger:hover {
    background: #ffffff;
    color: #111;
}
.efg-action-btn-trigger .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Master Desktop Grid Layout */
.efg-all-folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
}

/* ==========================================
   FIXED MOBILE ULTIMATE SOLUTION
   ========================================== */
@media (max-width: 767px) {
    .efg-all-folders-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        padding: 10px 5px 20px 5px;
        scrollbar-width: none; /* Hides default ugly track scrollbar on Firefox */
    }

    /* Hides default ugly scrollbar track on Chrome/Safari */
    .efg-all-folders-grid::-webkit-scrollbar {
        display: none;
    }

    .efg-all-folders-grid .efg-single-folder-layout {
        flex: 0 0 82% !important; /* Shows 1 full card + peeking edge of the next one */
        scroll-snap-align: start;
    }

    .efg-cover-card {
        height: 240px; /* Marginally scaled down height for mobile layout proportions */
    }
    
    .efg-card-actions {
        opacity: 1; /* Make share/download buttons immediately visible on mobile touch view */
        transform: translateX(0);
    }
}