/* Insights Cards — #FAFAFA section, white cards */

.insights-cards {
    --ic-pad-x: 16px;
    --ic-pad-y: 40px;
    --ic-gap: 24px;
    background: #fafafa;
    padding: var(--ic-pad-y) var(--ic-pad-x) 48px;
}

.insights-cards__inner {
    width: 100%;
    max-width: var(--akdev-content-max, 1440px);
    margin: 0 auto;
}

.insights-cards__toolbar {
    margin-bottom: 32px;
}

.insights-cards__filters--desktop {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.insights-cards__filters--mobile {
    display: block;
}

.insights-cards__select-label {
    display: block;
    width: 100%;
}

.insights-cards__select {
    width: 100%;
    max-width: 100%;
    padding: 12px 40px 12px 14px;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--black, #000);
    background-color: #fff;
    border: 1px solid var(--light-gray, #dee1ea);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%23151515' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px 20px;
    cursor: pointer;
}

.insights-cards__filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    min-height: 42px;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--black, #000);
    background: #fff;
    border: 1px solid var(--light-gray, #dee1ea);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.insights-cards__filter:hover {
    border-color: #c0c4cf;
}

.insights-cards__filter.is-active {
    background-color: var(--lazure-green, #2ec17b);
    color: #fff;
    border-color: var(--lazure-green, #2ec17b);
    font-weight: 600;
}

.insights-cards__filter-tick {
    display: none;
    flex-shrink: 0;
}

.insights-cards__filter.is-active .insights-cards__filter-tick {
    display: block;
}

.insights-cards__filter.is-active .insights-cards__filter-tick path {
    fill: currentColor;
}

.insights-cards__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--ic-gap);
}

.insights-cards__card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--light-gray, #dee1ea);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.insights-cards__card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.insights-cards__card.is-insights-hidden {
    display: none;
}

.insights-cards__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eee;
}

.insights-cards__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.insights-cards__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 20px 24px;
    flex: 1;
}

.insights-cards__date {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    color: #1b6986;
}

.insights-cards__title {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.25;
    color: var(--black, #000);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.insights-cards__excerpt {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.35;
    color: #5c5c5c;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    flex: 1;
}

.insights-cards__tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    margin-top: auto;
    background: #fff;
    border: 1px solid var(--light-gray, #dee1ea);
    border-radius: 6px;
}

.insights-cards__tag-text {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    background: linear-gradient(90deg, #00b8e0 0%, #91c73e 66%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.insights-cards__footer {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.insights-cards__more[hidden] {
    display: none;
}

.insights-cards__placeholder {
    margin: 16px 0 0;
    padding: 16px;
    border: 1px dashed #c0c4cf;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #5c5c5c;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (min-width: 768px) {
    .insights-cards {
        --ic-pad-x: 40px;
    }

    .insights-cards__filters--desktop {
        display: flex;
    }

    .insights-cards__filters--mobile {
        display: none;
    }

    /* Планшет и «фолбэк» десктопа до JS: две равные колонки */
    .insights-cards__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .insights-cards__title {
        font-size: 22px;
    }
}

@media (min-width: 1024px) {
    .insights-cards {
        --ic-pad-x: 120px;
        --ic-pad-y: 40px;
    }

    /* Десктоп: чередование ряд 2 карточки + ряд 3 (6 колонок). Класс --mosaic ставит JS. */
    .insights-cards__grid.insights-cards__grid--mosaic {
        grid-template-columns: repeat(6, 1fr);
    }

    .insights-cards__grid--mosaic .insights-cards__card--wide {
        grid-column: span 3;
    }

    .insights-cards__grid--mosaic .insights-cards__card--narrow {
        grid-column: span 2;
    }
}
