.tc-post-grid-wrapper {
    position: relative;
    width: 100%;
}

.tc-post-grid-container {
    overflow: visible;
    width: 100%;
}

.tc-post-grid-track {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.tc-grid-item {
    flex: 0 0 calc(33.333% - 20px);
    min-width: calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    position: relative;
}

.tc-grid-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tc-grid-item-inner {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    cursor: pointer;
}

.tc-grid-item-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.tc-grid-item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0F712C;
    padding: 20px;
    margin: 15px;
    border-radius: 16px;
    transition: opacity 0.3s ease;
    min-height: 80px;
    display: flex;
    align-items: center;
    z-index: 2;
}

.tc-grid-item-title {
    color: #F8F9EF;
    font-size: 24px;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

.tc-grid-item-hover {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0F712C;
    padding: 20px;
    margin: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-radius: 16px;
    z-index: 3;
    max-height: 60%;
}

.tc-grid-item-inner:hover .tc-grid-item-hover {
    opacity: 1;
}

.tc-grid-item-inner:hover .tc-grid-item-content {
    opacity: 0;
}

.tc-grid-item-title-hover {
    color: #F8F9EF;
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 15px 0;
    line-height: 1.3;
    position: relative;
    z-index: 100;
}

.tc-grid-item-excerpt {
    color: #F8F9EF;
    font-size: 16px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    position: relative;
    z-index: 100;
}

/* Edge decoration (optional - adds the orange corners) */
.tc-grid-item-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 10px;
    background: #F78F20;
    border-radius: 15px 0 15px 0;
}

.tc-grid-item-hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 10px;
    background: #F78F20;
    border-radius: 15px 0 15px 0;
}

.tc-grid-item-inner:hover .tc-grid-item-hover::after {
    width: calc(100%);
    height: calc(100%);
    transition: all 0.25s ease-out;
    z-index: 0;
    border-radius: 16px;
    z-index: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tc-grid-item {
        flex: 0 0 calc(50% - 15px);
        min-width: calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .tc-post-grid-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .tc-post-grid-track {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .tc-grid-item {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        width: 100%;
    }
    
    .tc-grid-item-title,
    .tc-grid-item-title-hover {
        font-size: 20px;
    }
    
    .tc-grid-item-excerpt {
        font-size: 16px;
    }
    
    .tc-grid-item-content {
        padding: 20px;
        min-height: 100px;
    }
    
    .tc-grid-item-hover {
        padding: 20px;
        max-height: 50%;
    }
}