/* ============================================
   taGrid - Сетка (общая)
   ============================================ */
.taGrid {
    display: grid;
    gap: var(--grid-gap, 20px);
    grid-template-columns: 1fr;
}

.taGrid__item {
    min-width: 0;
    max-width: 100%;
}

/* ============================================
   taCover - Обложка записи на всю ширину
   ============================================ */
.taCover {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(255, 255, 255, 0.8) 90%,
        rgba(255, 255, 255, 1) 100%
    );
}

.taCover__box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.taCover__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.taCover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, 
        transparent 0%,
        rgba(255, 255, 255, 0.3) 30%,
        rgba(255, 255, 255, 0.7) 60%,
        rgba(255, 255, 255, 1) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Адаптивность */
@media screen and (max-width: 768px) {
    .taCover {
        height: 200px;
    }
}

@media screen and (max-width: 480px) {
    .taCover {
        height: 150px;
    }
}


/* Статистика поверх изображения (при наведении) */
.taStats {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 3;
}

.taStats__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Показываем при наведении на родителя */
.taNewsCard:hover .taStats,
.taVideoCard:hover .taStats,
.taArticleCard:hover .taStats,
.taMemeCard:hover .taStats {
    opacity: 1;
}

/* На мобильных всегда видны */
@media screen and (max-width: 450px) {
    .taStats {
        opacity: 1;
    }
}

/* ============================================
   taStats--footer - Статистика в футере карточки
   ============================================ */
.taStats--footer {
    position: static;
    opacity: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    color: var(--theme-text_light, #888);
    background: none;
}

.taStats--footer .taStats__item {
    background: none;
    padding: 0;
    color: inherit;
    text-decoration: none;
}

.taStats--footer a.taStats__item:hover {
    color: var(--theme-primary, #8BC34A);
}

.taStats__item--muted {
    opacity: 0.6;
}



/* ============================================
   АДАПТИВНОСТЬ СЕТКИ
   ============================================ */
@media screen and (min-width: 451px) {
    .taGrid--6-column {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 768px) {
    .taGrid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .taGrid--6-column {
        grid-template-columns: repeat(3, 1fr);
    }
    
    :root:not(.enable--fluid) .taGrid__item--wide {
        grid-column: 1 / span 2;
    }
}

@media screen and (min-width: 998px) {
    .taGrid--3-column {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .taGrid--4-column {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .taGrid--6-column {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (min-width: 1181px) {
    .taGrid--6-column {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media screen and (min-width: 1551px) {
    :root.enable--fluid .taGrid {
        grid-template-columns: repeat(auto-fit, 560px);
    }
    
    :root.enable--fluid .taGrid--3-column {
        grid-template-columns: repeat(auto-fit, 450px);
    }
    
    :root.enable--fluid .taGrid--4-column {
        grid-template-columns: repeat(auto-fit, 360px);
    }
    
    :root.enable--fluid .taGrid--6-column {
        grid-template-columns: repeat(auto-fit, 230px);
    }
}