.ig-9d42136c-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-auto-rows: auto;
    grid-auto-flow: dense;
    gap: 15px;
    width: 100%;
}

.ig-9d42136c-item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.ig-9d42136c-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.ig-9d42136c-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

/* Portrait tile (1 column wide, 2 rows tall) */
.ig-9d42136c-item.ig-size-1x2 .ig-9d42136c-img-wrapper {
    aspect-ratio: 1 / 2;
}

/* Text-card tiles: image fills leftover space so the tile bottom stays flush */
.ig-9d42136c-item.has-text-card {
    height: 100%;
}

.ig-9d42136c-item.has-text-card .ig-9d42136c-img-wrapper {
    aspect-ratio: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.ig-9d42136c-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ig-9d42136c-item:hover .ig-9d42136c-img-wrapper img {
    transform: scale(1.05);
}

.ig-9d42136c-card-box {
    background: #ffffff;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: none;
    margin-top: 0;
}

.ig-card-subtitle {
    font-size: 14px;
    line-height: 1.2;
    display: block;
}

.ig-card-title {
    font-size: 24px;
    margin: 0;
    line-height: 1.3;
}

.ig-card-description {
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

/* Mobile: 2-column grid. Aspect-ratios keep every tile in proportion. */
@media (max-width: 767px) {
    .ig-9d42136c-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
