/* ====== Карточка аналитики ====== */

.analytics-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--card-analytics-bg, #0d1117);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.analytics-card:hover {
    transform: translateY(-3px);
    border-color: rgba(47, 140, 255, 0.28);
}

.analytics-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.analytics-card__image-wrap {
    display: block;
    flex-shrink: 0;
    overflow: hidden;
}

.analytics-card__image {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.analytics-card:hover .analytics-card__image {
    transform: scale(1.04);
}

.analytics-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #11151c;
    color: #48525f;
    font-size: 12px;
}

.analytics-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 12px;
}

.analytics-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    transition: color 0.15s ease;
}

.analytics-card:hover .analytics-card__title {
    color: #7db4ff;
}

.analytics-card__excerpt {
    margin: 0;
    color: #8a96a3;
    font-size: 13px;
    line-height: 1.5;
}

/* ====== Рубрика ====== */
.analytics-card__cat-row {
    display: flex;
    padding-top: 2px;
}

.analytics-card__cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;

    padding: 5px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cat) 14%, transparent);
    color: var(--cat);
    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analytics-card__cat i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* ====== Метаданные ====== */
.analytics-card__meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;

    margin-top: auto;
    padding-top: 10px;

    color: #6f7b8b;
    font-size: 12px;
    line-height: 1.4;

    overflow: hidden;
}

.analytics-card__sep {
    color: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.analytics-card__author {
    display: inline-block;
    max-width: 110px;
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* ====== Кнопка ====== */
.analytics-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin: 0 16px 16px;
    padding: 10px 14px;

    border-radius: 12px;
    border: 1px solid rgba(47, 140, 255, 0.22);
    background: rgba(47, 140, 255, 0.06);

    color: #7db4ff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;

    transition: background 0.18s ease,
                border-color 0.18s ease,
                color 0.18s ease;
}

.analytics-card__cta svg {
    transition: transform 0.2s ease;
}

.analytics-card__cta:hover {
    background: rgba(47, 140, 255, 0.14);
    border-color: rgba(47, 140, 255, 0.4);
    color: #a7ccff;
}

.analytics-card__cta:hover svg {
    transform: translateX(3px);
}

/* ====== Мобилка ====== */
@media (max-width: 720px) {
    .analytics-card__image {
        height: 176px;
    }

    .analytics-card__body {
        padding: 14px 14px 12px;
        gap: 9px;
    }

    .analytics-card__title {
        font-size: 15px;
    }

    .analytics-card__excerpt {
        font-size: 12px;
    }

    .analytics-card__cat {
        font-size: 11px;
        padding: 4px 9px;
    }

    .analytics-card__author {
        max-width: 80px;
    }

    .analytics-card__cta {
        margin: 0 14px 14px;
        font-size: 12px;
        padding: 9px 12px;
    }
}

.analytics-card__read {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

.analytics-card__read svg {
    opacity: 0.75;
    flex-shrink: 0;
}

.analytics-card__excerpt {
    margin: 0;
    color: #8a96a3;
    font-size: 13px;
    line-height: 1.5;
}

/* Прижимаем рубрику к нижней части карточки */
.analytics-card__cat-row {
    margin-top: auto;
}

/* Дата всегда располагается сразу под рубрикой */
.analytics-card__meta {
    margin-top: 0;
}