.middlebodycards1{
    position: relative;
    width: 100%;
}

.middlebodycards2{
    position: relative;
    top:3rem ;
}
.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 40px;
    width: 95%;
    top: 2rem;
    position: relative;
    padding: 20px 0px;
}

.card {
    border-radius: 10px;
    overflow: hidden;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
    
}

.card:hover {
    transform: translateY(-10px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: fill;
}

.dark .card-content h5{
    color: black;
}


.dark .card-content h6{
    color: black;
}

.card-content {
    padding: 15px;
    text-align: left;
}

.card-content h4 {
    margin-bottom: 10px;
    font-size: 19px;
}

#Top{
    right: 7%;
    position: absolute;
    top: 50%;
}

#Featured{
    right: 7%;
    position: absolute;
    top: 90%;
}

#Urgent{
    right: 10%;
    position: absolute;
    top: 7%;
}
.card-content p {
    font-size: 14px;
    color: #0b0b0b;
    margin-bottom: 15px;
}

.card-content button {
    background-image:linear-gradient(rgb(255, 162, 0),rgb(255, 140, 0));
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}

.card-content button:hover {
    background-color: #ff9531;
}
.link{
    text-decoration: none;
    color: aliceblue;
}

/* Responsive Design */
@media (min-width: 2000px) {
.gallery {
    display: grid;
    width: 95%;
    top: 2rem;
    position: relative;
    padding: 20px 0px;
}
.card {
    max-width: 600px;
}
.card img {
    height: 260px;
}

.card-content {
    padding: 15px;
    text-align: left;
    font-size: 20px;
}

.card-content h4 {
    font-size: 26px;
}
  .card-content p {
    font-size: 23px;
}
}


@media (max-width: 1224px) {
    .gallery {
        grid-template-columns: 1fr 1fr 1fr; /* Two columns */
        width: 95%;
        top: 1.5rem;
        gap: 15px;
        padding: 35px 0px;

    }

}

@media (max-width: 1000px) {
    .gallery {
        top: 1.3rem;
        grid-template-columns: 1fr 1fr 1fr; /* Two columns */
        width: 100%;
        padding: 0px 9px;
    }
.card-content button {
    padding: 8px 11px;
    font-size: 12px;
}

.card-content h4 {
    font-size: 16px;
}
.card-content h6 {
    font-size: 13px;
}
.card-content p {
    font-size: 12px;
}

}

@media (max-width: 778px) {
    .gallery {
        grid-template-columns:  1fr 1fr;
        width: 98%;  
    }
}

@media (max-width: 550px) {
    .gallery {
        grid-template-columns: 1fr;
        width: 70%;  
    }
}

@media (max-width: 450px) {
    .gallery {
        width: 90%;  
    }
}

@media (max-width: 350px) {
    .gallery {
        width: 98%;  
    }
}