.cart_content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.subject-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    /* height: 100%; */
}

.subject-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.subject-image-container {
    /* overflow: hidden;
    height: 180px; */
    position: relative;
}

.subject-image-container img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.subject-item:hover .subject-image-container img {
    transform: scale(1.05);
}

.subject-content {
    padding: 0px 10px 10px 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
}

.subject-title {
    /* margin: 0 0 15px 0; */
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    height: 44px;
    overflow: hidden;
}

.subject-title a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.subject-title a:hover {
    color: #3498db;
}

/* Social Share and Date Section */
.pags_share_items {
    /* display: flex; 
    justify-content: space-between; */
    align-items: center;
    /* padding: 15px 0 0 0; */
    border-top: 1px solid #eef2f7;
    margin-top: 15px;
    /* flex-wrap: wrap;
    gap: 12px; */
}

.pags_share {
    display: flex;
    justify-content: space-between;
    padding: 10px 5px;
    gap: 10px;
}

.share {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Individual social media colors */
.share.facebook {
    background: linear-gradient(135deg, #3b5998, #4a69a8);
    color: white;
}

.share.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.share.telegram {
    background: linear-gradient(135deg, #0088cc, #0099cc);
    color: white;
}

/* Hover effects */
.share:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.share.facebook:hover {
    background: linear-gradient(135deg, #4a69a8, #3b5998);
}

.share.whatsapp:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
}

.share.telegram:hover {
    background: linear-gradient(135deg, #0099cc, #0088cc);
}

.pags_date {
    font-size: 10px;
    color: #6c757d;
    font-weight: 500;
    padding: 10px 0px;
    border-radius: 15px;
    /* display: inline-flex;
    align-items: center; */
}


/* Responsive breakpoints */
/* Large Desktop - 5 columns */
@media (min-width: 1400px) {
    .cart_content {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        padding: 25px;
    }
    
    /* .subject-image-container {
        height: 200px;
    } */
    
    .subject-title {
        font-size: 11px;
    }
}

/* Desktop - 4 columns */
@media (max-width: 1399px) and (min-width: 1100px) {
    .cart_content {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
}

/* Laptop - 3 columns */
@media (max-width: 1099px) and (min-width: 768px) {
    .cart_content {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 15px;
    }
    
    .subject-image-container {
        height: 160px;
    }
    
    .subject-content {
        padding: 15px;
    }
    
    .subject-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .pags_share_items {
        padding: 12px 0 0 0;
        margin-top: 12px;
    }
}

/* Tablet - 2 columns */
@media (max-width: 767px) and (min-width: 480px) {
    .cart_content {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    
    .subject-image-container {
        height: 150px;
    }
    
    .subject-content {
        padding: 15px;
    }
    
    .share {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .pags_date {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* Mobile - 1 column */
@media (max-width: 479px) {
    .cart_content {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        /* padding: 10px; */
    }
    
    .subject-item {
        margin: 0 5px;
    }

    .pags_share {
    padding: 0px;
}
    
    
    .subject-title {
        font-size: 10px !important;
        margin-bottom: -15px;
    }
    
    .pags_share_items {
        /* flex-direction: column;
        align-items: flex-start; */
        gap: 2px;
    }
    
}

/* Extra large screens */
@media (min-width: 1600px) {
    .cart_content {
        max-width: 1600px;
        margin: 0 auto;
        gap: 35px;
    }
    
    /* .subject-image-container {
        height: 220px;
    } */
}

/* Loading animations */
.subject-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays */
.subject-item:nth-child(1) { animation-delay: 0.1s; }
.subject-item:nth-child(2) { animation-delay: 0.2s; }
.subject-item:nth-child(3) { animation-delay: 0.3s; }
.subject-item:nth-child(4) { animation-delay: 0.4s; }
.subject-item:nth-child(5) { animation-delay: 0.5s; }
.subject-item:nth-child(6) { animation-delay: 0.6s; }
.subject-item:nth-child(7) { animation-delay: 0.7s; }
.subject-item:nth-child(8) { animation-delay: 0.8s; }
.subject-item:nth-child(9) { animation-delay: 0.9s; }
.subject-item:nth-child(10) { animation-delay: 1.0s; }

/* Hover effect for social icons */
.share {
    position: relative;
    overflow: hidden;
}

.share::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.share:hover::before {
    left: 100%;
}