.container {

display: flex;

justify-content: center;

align-items: flex-start; /* Keeps gallery at the top of the screen */

width: 100%;

position: relative;

margin-top:50px;

background-color: #f4f4f4;

}

.gallery {

display: grid;

padding:10px;

grid-template-columns: repeat(3, 1fr);

gap: 20px;

width: 100%;

max-width: 1200px;

    /*margin-top:300px;*/

}

.card {

background-color: white;

border-radius: 8px;

box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

overflow: hidden;

text-align: center;

padding: 20px;

transition: transform 0.3s;

}

.card:hover {

transform: scale(1.05);

}

.card img {

width: 100%;

height: 200px;

object-fit: cover;

border-radius: 8px;

}

.details {

margin-top: 10px;

}

button {

padding: 10px 15px;

margin: 5px;

border: none;

background-color: #007BFF;

color: white;

border-radius: 5px;

cursor: pointer;

}

button:hover {

background-color: #0056b3;

}

.likes, .dislikes {

margin-top: 5px;

}

.views {

font-weight: bold;

}

/* Small screens (max-width: 576px) */

@media (max-width: 576px) {

.gallery {

    grid-template-columns: 1fr;  /* 1 column for very small screens */

    width: 100%;

    height: auto;

}

.container {

    min-width: 100px;

}

.card img {

    height: auto; /* Smaller image size for small screens */

    width: 100%;

    max-width:300px;

}

.card p {

    color :gold;

}

.details {

    padding: 10px;

}

button {

    width: 100%;

    padding: 12px;

}

}

/* Medium-small screens (576px to 768px) */

@media (min-width: 576px) and (max-width: 768px) {

.gallery {

    grid-template-columns: repeat(2, 1fr);  /* 2 columns for small to medium screens */

    width: 100%;

    height: auto;

}

.container {

    min-width: 400px;

}

.card img {

    height: auto; /* Slightly smaller image height */

    width: 100%;

    max-width:300px;

}

.card p {

    color :red;

}

.details {

    padding: 15px;

}

button {

    width: 48%;

    padding: 12px;

}

}

/* Medium screens (768px to 992px) */

@media (min-width: 768px) and (max-width: 880px) {

.gallery {

    grid-template-columns: repeat(3, 1fr);  /* 3 columns for medium screens */

    width: 100%;

    height: auto;

}

.container {

    min-width: 750px;

}

.card img {

    height: auto; /* Standard image size */

    width: 100%;

    max-width:300px;

}

.card p {

    color :blue;

}

button {

    width: 48%;

    padding: 12px;

}

}

/* Medium screens (768px to 992px) */

@media (min-width: 880px) and (max-width: 992px) {

.gallery {

    grid-template-columns: repeat(3, 1fr);  /* 3 columns for medium screens */

    width: 100%;

    height: auto;

}

.container {

    min-width: 860px;

}

.card img {

    height: auto; /* Standard image size */

    width: 100%;

    max-width:300px;

}

.card p {

    color :orange;

}

button {

    width: 48%;

    padding: 12px;

}

}

/* Large screens (992px to 1000px) */

@media (min-width: 992px) and (max-width: 1000px) {

.gallery {

    grid-template-columns: repeat(3, 1fr);  /* Ensure 3 columns for large screens */

    width: 100%;

    height: auto;

}

.container {

}

.card img {

    height: auto; /* Larger image size for bigger screens */

    width: 100%;

    max-width:300px;

}

.card p {

    color :green;

}

.details {

    padding: 20px;

}

button {

    width: 48%;

    padding: 14px;

}

}

/* Extra large screens (1000px and above) */

@media (min-width: 1000px) {

/**/    .gallery {

grid-template-columns: repeat(3, 1fr);

    width: 100%;

    height: auto;

    

}

.container {

}

.card img {

    height: auto;

    width: 100%;

    max-width:300px;

}

.details {

    padding: 20px;

}

button {

    width: 48%;

    padding: 14px;

}

}

/* Pagination container adjustments */

    .pagination-container {

        width: 100%; /* Use full width for smaller devices */

        display: flex;

        flex-direction: column; /* Stack the buttons and page numbers vertically */

        justify-content: center;

        margin: 20px 0;

        padding: 0 10px; /* Add some padding to prevent edges from being too tight */

    }



    /* Adjust list items for better mobile experience */

    .list-group-item {

        padding: 10px 15px;

    }



    /* Pagination buttons */

    .pagination-buttons {

        display: flex;

        justify-content: center;

        margin-bottom: -10px;

    }



    .pagination-buttons .page-item {

        margin: 0 2px;

    }



    /* Pagination numbers */

    .pagination-numbers {

        display: flex;

        justify-content: center;

    }



    .pagination-numbers .page-item {

        margin: 0 2px;

    }



    .pagination .page-link {

        font-size: 14px;

        padding: 8px 12px;

    }





    /* Make pagination smaller for mobile */

    @media (max-width: 768px) {

        .pagination .page-item {

            font-size: 12px; /* Smaller font for mobile */

            padding: 5px 8px;

        }



        .pagination-container {

            width: 100%; /* Ensure pagination fits width on mobile */

        }



        .list-group-item {

            font-size: 14px; /* Adjust font size for mobile */

            padding: 8px 10px;

        }

    }



    /* For very small screens */

    @media (max-width: 480px) {

        .pagination .page-link {

            padding: 6px 8px; /* Smaller padding on smaller screens */

        }

    }



