.tgcm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr)!important; /* Changed to always show 3 columns */
    gap: 20px;
}

@media (max-width: 992px) {
    .tgcm-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tgcm-grid {
        grid-template-columns: 1fr;
    }
}

.tgcm-grid-item {
    cursor: pointer;
    text-align: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.tgcm-grid-item:hover {
    transform: scale(1.05);
}

.tgcm-grid-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.tgcm-grid-item-content {
    padding: 10px;
        height: 100%;
}

.tgcm-carousel {
    margin: 0 -10px; /* Add negative margin to counteract item padding */
}

.tgcm-carousel-item {
    text-align: center;
    padding: 10px;
}

.tgcm-carousel-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.tgcm-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.tgcm-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
}

.tgcm-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.tgcm-close:hover,
.tgcm-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.tgcm-modal-image-container {
    text-align: center;
    margin-bottom: 20px;
}

#tgcm-modal-image {
    max-width: 100%;
    height: auto;
}