/* Блог страхової. Палітра взята зі style.css / news.css цього ж бандла. */

.blog-page,
.blog-single {
    padding: 30px 0 60px;
}

.blog-page__title,
.blog-single__title {
    margin: 0 0 24px;
    color: #343434;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
}

/* --- Категорії --- */

.blog-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}

.blog-categories__item {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 18px;
    background: #fff;
    color: #5d5d5d;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.blog-categories__item:hover {
    border-color: #da393e;
    color: #da393e;
    text-decoration: none;
}

.blog-categories__item.active {
    border-color: #da393e;
    background: #da393e;
    color: #fff;
}

.blog-categories__more {
    position: relative;
}

.blog-categories__more > summary {
    padding: 7px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 18px;
    color: #5d5d5d;
    font-size: 14px;
    line-height: 20px;
    list-style: none;
    cursor: pointer;
}

.blog-categories__more > summary::-webkit-details-marker {
    display: none;
}

.blog-categories__more-list {
    position: absolute;
    z-index: 5;
    top: calc(100% + 6px);
    left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 240px;
    max-width: 420px;
    padding: 12px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

/* --- Сітка карток --- */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 30px;
    margin-bottom: 40px;
}

.blog-card {
    display: flex;
    flex-direction: column;
}

.blog-card__img-link {
    display: block;
    margin-bottom: 14px;
}

.blog-card__img {
    display: block;
    width: 100%;
    height: 210px;
    border-radius: 6px;
    object-fit: cover;
}

.blog-card__img--empty {
    background: #f6f6f6;
}

.blog-card__labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.blog-card__label {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    background: #f8f8f8;
    color: #5d5d5d;
    font-size: 12px;
    line-height: 18px;
    text-decoration: none;
}

.blog-card__label:hover {
    color: #da393e;
    text-decoration: none;
}

.blog-card__meta {
    display: flex;
    gap: 18px;
    margin-bottom: 8px;
    color: #5d5d5d;
    font-size: 13px;
    line-height: 18px;
}

.blog-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-card__meta-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #da393e;
    flex: 0 0 auto;
}

.blog-card__title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #343434;
    font-size: 17px;
    line-height: 24px;
    font-weight: 600;
    text-decoration: none;
}

.blog-card__title:hover {
    color: #da393e;
    text-decoration: none;
}

.blog-empty {
    padding: 40px 0;
    color: #5d5d5d;
    font-size: 16px;
}

/* --- Пагінація --- */

.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.blog-pagination__page,
.blog-pagination__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    background: #fff;
    color: #414141;
    font-size: 14px;
    text-decoration: none;
}

.blog-pagination__page:hover,
.blog-pagination__arrow:hover {
    border-color: #da393e;
    color: #da393e;
    text-decoration: none;
}

.blog-pagination__page.active {
    border-color: #da393e;
    background: #da393e;
    color: #fff;
}

/* --- Сторінка статті --- */

.blog-single__breadcrumbs {
    width: 100%;
}

.blog-single__top {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.blog-single__media {
    flex: 2 1 0;
    min-width: 0;
}

.blog-single__aside {
    flex: 1 1 0;
    min-width: 0;
}

.blog-single__img {
    display: block;
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 6px;
}

.blog-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 20px;
    color: #5d5d5d;
    font-size: 14px;
}

.blog-single__author {
    color: #343434;
    font-weight: 600;
}

.blog-single__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-single__meta-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #da393e;
    flex: 0 0 auto;
}

.blog-single__content {
    color: #414141;
    font-size: 16px;
    line-height: 26px;
    padding-bottom: 20px;
}

.blog-single__content img {
    display: block;
    width: auto;
    max-width: min(100%, 450px);
    height: auto !important;
    margin: 20px auto;
    object-fit: contain;
    clear: both;
}

.blog-single__content figure {
    width: auto !important;
    max-width: min(100%, 450px);
    margin: 20px auto;
}

.blog-single__content figure img {
    margin: 0 auto;
}

.blog-single__content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    -webkit-overflow-scrolling: touch;
}

.blog-single__content th,
.blog-single__content td {
    padding: 8px 10px;
    vertical-align: top;
}

.blog-single__content h2,
.blog-single__content h3 {
    margin: 28px 0 12px;
    color: #343434;
}

.blog-single__labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 28px 0 20px;
}

.blog-single__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #E5E5E5;
}

.blog-single__share-title {
    color: #343434;
    font-weight: 600;
}

.blog-single__share-link {
    padding: 6px 14px;
    border: 1px solid #E5E5E5;
    border-radius: 18px;
    color: #5d5d5d;
    font-size: 14px;
    text-decoration: none;
}

.blog-single__share-link:hover {
    border-color: #da393e;
    color: #da393e;
    text-decoration: none;
}

.blog-aside {
    padding: 20px;
    border-radius: 6px;
    background: #f8f8f8;
}

.blog-aside__title {
    margin-bottom: 14px;
    color: #343434;
    font-size: 18px;
    font-weight: 600;
}

.blog-aside__link {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #E5E5E5;
    color: #414141;
    font-size: 15px;
    line-height: 22px;
    text-decoration: none;
}

.blog-aside__link:last-child {
    border-bottom: none;
}

.blog-aside__link:hover {
    color: #da393e;
    text-decoration: none;
}

.blog-similar {
    margin-top: 50px;
}

.blog-similar__title {
    margin-bottom: 24px;
    color: #343434;
    font-size: 24px;
    font-weight: 700;
}

/* --- Адаптив --- */

@media (max-width: 991px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-single__top {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .blog-single__media,
    .blog-single__aside {
        flex-basis: auto;
        width: 100%;
    }

    .blog-aside {
        margin-top: 0;
    }

    .blog-single__content table > thead,
    .blog-single__content table > tbody,
    .blog-single__content table > tfoot {
        min-width: 960px;
    }

    .blog-single__content th,
    .blog-single__content td {
        min-width: 140px;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }
}

@media (max-width: 575px) {
    .blog-page__title,
    .blog-single__title {
        font-size: 24px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .blog-card__img {
        height: 200px;
    }

    .blog-pagination {
        justify-content: center;
    }
}
