.grid-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.grid-col {
    flex-grow: 1;
    flex-basis: calc(33.333% - 1rem);
}

@media (max-width: 768px) {
    .grid-col {
        flex-basis: calc(50% - 1rem);
    }
}

@media (max-width: 576px) {
    .grid-col {
        flex-basis: 100%;
    }
}

.tile-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    color: white;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    height: 100%;
    min-height: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tile-card img.tile-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.4s ease;
}

.tile-card.active:hover img.tile-bg {
    transform: scale(1.05);
}

.tile-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%; /* чуть больше, чем текстовая область */
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    z-index: 1;
    pointer-events: none;
    border-radius: 0 0 0.5rem 0.5rem;
}

.tile-content {
    position: relative;
    z-index: 2;
    padding: 1rem;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    width: 100%;
}

.tile-content strong {
    display: block;
    font-size: 1.1rem;
}

.tile-large {
    height: 400px;
}

.tile-medium {
    height: 250px;
}

.tile-small {
    height: 180px;
}

.tile-content strong,
.tile-content small {
    text-shadow: 0 2px 6px rgba(1,0,0,1);
}

.tile-card.placeholder {
    background: transparent;
    box-shadow: none;
    border: none;
    visibility: hidden; /* или opacity: 0, если хочешь сохранить высоту */
}

.tile-overlay,
.tile-content {
    pointer-events: none;
}