/* Flexbox container */
.download-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* Consistent box sizing for 3 items per row */
.download-item {
    flex-basis: 30%; /* 3 items per row */
    margin-bottom: 20px; /* Space between boxes */
    padding: 15px;
    background-color: #ECBE07;
    border-radius: 8px;
    border: 1px solid black; /* Black border */
    text-align: center;
    box-sizing: border-box;
    min-height: 350px; /* Ensure all boxes are tall enough to accommodate content */
    position: relative; /* Positioning context for absolute elements */
    transition: transform 0.3s ease, background-color 0.3s ease, border-radius 0.3s ease;
    will-change: transform, background-color;
    overflow: hidden; /* Prevent overflow when scaling the images */
}

/* Image styling */
.download-item img {
    width: 100%; /* Set width to 100% to fill the container */
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    border-radius: 8px;
    transition: transform 0.5s ease, opacity 0.5s ease; /* Smoother and slower transformation */
    will-change: transform, opacity;
}

/* Game name (h3) styling */
.download-item h3 {
    margin: 15px 0;
    font-size: 18px;
    transition: color 0.3s ease; /* Transition for hover effect */
}

/* Hover effect on game name */
.download-item:hover h3 {
    color: white; /* Change name color to white on hover */
}

/* Subtle hover effect on the box */
.download-item:hover, .download-item:active {
    transform: scale(1.03); /* Minor scaling for smoother interaction */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); /* Lighter shadow for a more elegant feel */
    background-color: #333; /* Black background highlight */
}

/* Image hover effect */
.download-item:hover img {
    transform: scale(1.1); /* Subtle zoom-in effect on hover */
    opacity: 0.9; /* Slight fade for a softer look */
}

/* Button container */
.button-container {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    text-align: center;
    z-index: 1;
}

/* Button styling */
.button-container .btn {
    display: inline-block;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    will-change: transform, background-color;
    border: 1px solid black; /* Black border */
}

/* Button hover effect */
.button-container .btn:hover {
    background-color: #28a745;
    transform: scale(1.05); /* Slight scaling for button hover */
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .download-item {
        flex-basis: 45%; /* 2 items per row on tablets */
        min-height: 300px;
    }

    .download-item h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .button-container {
        position: relative;
        margin-top: 10px;
        width: auto;
    }
}

@media (max-width: 480px) {
    .download-item {
        flex-basis: 100%; /* Full width on mobile */
        min-height: 250px;
        border-radius: 12px;
    }

    /* Simulate hover effect for mobile */
    .download-item:active img, .download-item:focus img {
        transform: scale(1.05); /* Less aggressive zoom for mobile */
        opacity: 0.95; /* Slight fade */
    }

    .download-item h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .button-container {
        margin-top: 15px;
        padding: 0 10px;
    }
}

/* Scroll animation for images */
.scroll-animate {
    transform: scale(1.1);
    opacity: 1;
    transition: transform 0.5s ease, opacity 0.5s ease;
}
