/* Блок blog */
.blog {
    padding-bottom: 90px;
}

.blog .title__section {
	font-size: 52px;
margin: 0 0 20px 0;
}

.blog__search-sec {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.blog__search-text {
    max-width: 49%;
    width: 100%;
    font-size: 16px;
    font-weight: 400;
    color: #2B2B2B;
}

/* Поиск */
.blog__search {
    position: relative;
    max-width: 49%;
    width: 100%;
}

.blog__search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    background: #F5F7FB;
    border: 1px solid #064A69;
    font-weight: 400;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 100%;
}

.blog__search-input:focus {
    outline: none;
    border-color: #77B94C;
    box-shadow: 0 0 0 3px #77B94C;
}

/* Кнопка отправки поиска.
   Раньше на этом месте стоял декоративный <span> с иконкой, поэтому в правиле
   было pointer-events: none. Сейчас это настоящий <button type="submit">, и
   старое правило гасило по нему клики - поиск не отправлялся. Заодно снимаем
   оформление кнопки от браузера (серый фон, рамку, padding), из-за которого
   вместо иконки была видна «системная» кнопка.
   Размер 34x34 - это область клика; центр иконки остаётся там же, где был
   у span (25px от правого края), и не заходит за padding-right инпута. */
.blog__search-icon {
    position: absolute;
    right: 8px;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    border-radius: 6px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.blog__search-icon:hover,
.blog__search-icon:focus-visible {
    color: #064A69;
}

.blog__search-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* Выделенные статьи (последние 2) */
.blog__featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.blog__featured-item {
    height: 350px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;

    transition: all .4s;
}

.blog__feature-bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(43, 43, 43, 0) 50%, rgba(43, 43, 43, 0.7) 100%);
}

.blog__featured-meta-box {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 20px 20px;
}

.blog__featured-category {
    position: absolute;
}


.blog__featured-image-wrapper {
    width: 100%;
    height: 100%;
}

.blog__featured-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.blog__featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog__featured-category {
    top: 10px;
    left: 10px;
    padding: 4px 16px 4px 32px;
    max-width: max-content;
    backdrop-filter: blur(20px);
    border-radius: 20px;
    color: #2B2B2B;
    font-size: 14px;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.5);
}
.blog__featured-category:after {
        content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(140.25deg, #FFFFFF 13.18%, rgba(255, 255, 255, 0) 28.73%, rgba(255, 255, 255, 0) 75.37%, #FFFFFF 90.92%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.blog__featured-category:before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 8px;
    height: 8px;
    background: #179BD7;
    border-radius: 50%;
}



.blog__featured-item:hover .blog__featured-image {
    transform: scale(1.05);
}

.blog__featured-content {
    padding: 25px;
}

.blog__featured-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #F5F7FB;
}


.blog__featured-title {
    font-size: 22px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 8px 0;
    line-height: 100%;
}

.blog__featured-title-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog__featured-reading-time {
    padding-left: 20px;
    position: relative;
}

.blog__featured-reading-time:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url(/upload/clock.svg);
}


.blog__featured-preview {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}


.blog__tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 40px 0;
}

.blog__tag {
    border-radius: 8px;
    padding: 10px 16px;
    max-width: max-content;
    width: 100%;
    border: 1px solid;
    border-image-source: linear-gradient(319.03deg, #179BD7 4.01%, rgba(23, 155, 215, 0) 31.61%, rgba(23, 155, 215, 0) 68.39%, #179BD7 95.99%);
    background: #F5F7FB;
    color: #2B2B2B;
    font-size: 16px;
    font-weight: 500;
    transition: all .4s;
    position: relative;
    outline: none !important;
    min-width: max-content;
}

.blog__tag::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(319.03deg, #179BD7 4.01%, rgba(23, 155, 215, 0) 31.61%, rgba(23, 155, 215, 0) 68.39%, #179BD7 95.99%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}




.blog__tag:hover {
    background: #179BD7;
    color: #fff;
}

.blog__tag--active {
    background: #179BD7;
    color: #fff;
}





/* Список статей */
.blog__list {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

/* Карточка статьи */
.blog__item {
    max-width: calc(33% - 23px);
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}



.blog__image-link {
    max-width: 100%;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.blog__image {
    max-width: 100%;
    height: 100%;
    width: 100%;
    border-radius: 8px;
}

.blog__property {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 16px 4px 32px;
    max-width: max-content;
    backdrop-filter: blur(20px);
    border-radius: 20px;
    color: #2B2B2B;
    font-size: 14px;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.5);
}

.blog__property::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(140.25deg, #FFFFFF 13.18%, rgba(255, 255, 255, 0) 28.73%, rgba(255, 255, 255, 0) 75.37%, #FFFFFF 90.92%);


    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.blog__property:before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 8px;
    height: 8px;
    background: #179BD7;
    border-radius: 50%;
}





.blog__meta {
    display: flex;
    justify-content: space-between;
    color: #064A69;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 400;
}
.blog__date {
    color: #2B2B2B;
}

.blog__reading-time {
    position: relative;
}

.blog__reading-time:before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url(/upload/clock-b.svg);
}

.blog__featured-title {
    font-size: 22px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 8px 0;
    line-height: 100%;
}

.blog__title-link {
    font-weight: 600;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #2B2B2B;
    margin: 0 0 8px 0;
}


.blog__preview-text {
    margin: 0;
    color: #404040;
    line-height: 120%;
    font-size: 14px;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.6em * 3);
    /* fallback для Firefox */
}

.blog__preview-text p {
    margin: 0;
}

.blog__custom-block {
	max-width: 100%;
	width: 100%;
	margin: 0 0 40px 0;
}





/* Пагинация */
.blog__pager {
    margin-top: 40px;
    text-align: center;
}

.blog__pager--top {
    margin-bottom: 30px;
    margin-top: 0;
}


/* Стили для кнопки "Показать еще" */
.blog__load-more-wrapper {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
}

.blog__load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 200px;
    height: 50px;
    background: #064A69;
    color: #fff;
    border: 1px solid #064A69;
    border-radius: 7px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
    outline: none;
}

.blog__load-more-btn:hover:not(:disabled) {
    background: transparent;
    color: #2B2B2B;
    outline: none;
    border: 1px solid #064A69;
}

.blog__load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.blog__load-more-count {
    font-weight: 700;
}

.blog__load-more-info {
    margin-top: 12px;
    color: #666;
    font-size: 14px;
}

.blog__load-more-info span {
    font-weight: 600;
    color: #333;
}

.blog__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

.blog__pagination a,
.blog__pagination-current,
.blog__pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #064A69;
    border-radius: 7px;
    color: #064A69;
    line-height: 1;
}

.blog__pagination a:hover,
.blog__pagination-current {
    background: #064A69;
    color: #fff;
}

.blog__pagination-current {
    font-weight: 600;
}

.blog__pagination-dots {
    min-width: auto;
    border-color: transparent;
}

.blog__pagination-prev,
.blog__pagination-next {
    min-width: 110px !important;
}

/* Плавное появление новых статей */
.blog__item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.blog__item[style*="display:none"] {
    opacity: 0;
    transform: translateY(20px);
}

.blog__item:not([style*="display:none"]) {
    opacity: 1;
    transform: translateY(0);
}




/* Адаптивность */
@media screen and (max-width: 1150px) {
    .blog__item {
        max-width: calc(33% - 24px);
    }
}

@media screen and (max-width: 1024px) {
    .blog__item {
        max-width: calc(50% - 20px);
    }

    .blog__search-sec {
        flex-direction: column;
    }

    .blog__search-text,
    .blog__search {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {

    .blog__featured {
        display: flex;
        flex-direction: column;
    }

    .blog__featured-item {
        max-width: 100%;
        width: 100%;
        height: 300px;
    }
}

@media screen and (max-width: 650px) {
    .blog__list {
        gap: 20px;
    }

    .blog__item {
        max-width: 100%;
    }
}
