/* ============================================
   Главная страница блогов — index.php
   ============================================ */

html {
    font-size: 10px;
}

* {
    box-sizing: border-box;
}

/* --- Вкладки --- */
.blogs-tabs {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 32px;
    margin-top: 0;
}

.blogs-tabs .nav-link {
    padding: 12px 20px;
    color: #AAA6A1;
    font-family: 'Inter-Medium', sans-serif;
    font-size: 1.5rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    transition: all 0.2s ease;
}

.blogs-tabs .nav-link:hover {
    color: #E23737;
    background: transparent;
}

.blogs-tabs .nav-link.active {
    color: #E23737;
    background: transparent;
    border-bottom-color: #E23737;
    font-family: 'Inter-SemiBold', sans-serif;
}

.blogs-content {
    background: transparent;
    padding: 0;
}

/* --- Сетка карточек (стиль новостей) --- */
.review_main__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    row-gap: 32px;
    margin-top: 0;
    margin-bottom: 0;
    justify-content: start;
}

@media (min-width: 1920px) {
    .review_main__list {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }
}

.news-list {
    margin: 32px 0;
}

/* --- Поле поиска --- */
.blogs-search-input {
    background: #fff !important;
    border: 1px solid #D9D7D5 !important;
    border-radius: 8px;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 15px;
    min-width: 200px;
}

.blogs-search-input:focus {
    border-color: #E23737 !important;
    box-shadow: 0 0 0 2px rgba(226, 55, 55, 0.15);
    outline: none;
}

/* --- Карточка новости --- */
.review_main-item {
    display: block;
    width: 382.656px;
    height: 240px;
    min-height: 240px;
    max-height: 240px;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    position: relative;
}

.review_main-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
    min-height: 240px;
    max-height: 240px;
    display: block;
    overflow: hidden;
}

/* Градиентный оверлей */
.review_main-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(134.22deg, rgba(0, 0, 0, 0) -8.88%, rgba(0, 0, 0, 0.32) 73.3%);
    z-index: 1;
}

/* Изображение карточки */
.review_main-img {
    object-position: center;
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    background: #CFCCC9;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: transform 0.5s ease;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: unset;
}

.review_main-item:hover .review_main-img {
    transform: scale(1.1);
}

.review_main-wrapper > div.review_main-img {
    transition: transform 0.5s ease;
}

.review_main-item:hover .review_main-wrapper > div.review_main-img {
    transform: scale(1.1);
}

.review_main-wrapper > i:not(.review_main-stats i) {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #AAA6A1;
    z-index: 0;
}

/* Текстовый блок внизу карточки */
.review_main-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    z-index: 2;
}

/* Заголовок новости */
.review_main-title {
    font-size: 17px;
    color: #ffffff;
    font-family: 'Inter-SemiBold', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin: 0;
}

/* Дата и просмотры */
.news-item-info {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #ffffff;
    font-family: 'Inter-Medium', sans-serif;
    align-items: center;
}

.news-item-info span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    border-radius: 16px;
    padding: 4px 10px;
    backdrop-filter: blur(32px);
    background: #FFFFFF29;
    opacity: .6;
    font-size: 13px;
    font-family: 'Inter-Regular', sans-serif;
}

/* Блок иконок статистики */
.review_main-stats {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    z-index: 3;
    white-space: nowrap;
    width: auto;
    height: auto;
}

.review_main-stat-item {
    display: flex;
    justify-content: center;
    gap: 4px;
    align-items: center;
    border-radius: 16px;
    padding: 4px 10px;
    backdrop-filter: blur(32px);
    background: #FFFFFF29;
}

.review_main-stats i.fas,
.review_main-stats i.fa {
    color: #ffffff !important;
    opacity: .6 !important;
    font-size: 13px !important;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro', 'FontAwesome', sans-serif !important;
    font-weight: 900 !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    vertical-align: baseline !important;
    text-align: center !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    font-style: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    speak: none !important;
}

.review_main-stat-item span {
    color: #ffffff;
    font-size: 11px;
    font-family: 'Inter-Regular', sans-serif;
    line-height: 1;
}

/* --- Кнопки link_btn --- */
.link_btn {
    font-family: 'Inter-Regular', sans-serif;
    font-size: 15px;
    text-align: center;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
}

.link_btn__dark {
    background: #E23737;
    color: #FFFFFF;
}

.link_btn__dark:hover {
    background: #e54d4d;
    color: #FFFFFF;
}

.link_btn__light {
    background: transparent;
    color: #E23737;
    border: 1px solid #E23737;
}

.link_btn__light:hover {
    background: #E23737;
    color: #FFFFFF;
}

/* --- Бейджи --- */
.badge-ks {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter-Medium', sans-serif;
}

.badge-ks-category {
    background: rgba(226, 55, 55, 0.1);
    color: #E23737;
}

.badge-ks-pinned {
    background: #ffc107;
    color: #353433;
}

.badge-ks-tag {
    background: #e7f3ff;
    color: #0d6efd;
    text-decoration: none;
    transition: all 0.2s ease;
}

.badge-ks-tag:hover {
    background: #0d6efd;
    color: #fff;
}

/* --- Адаптивность --- */
@media (max-width: 1200px) {
    .review_main__list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
        max-width: 100%;
        justify-content: start;
    }
    .review_main-item {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .review_main__list {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 12px;
        row-gap: 24px;
        justify-content: start;
    }
    .review_main-item {
        width: 100%;
        height: 220px;
    }
}

@media (max-width: 768px) {
    .review_main__list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        row-gap: 20px;
        margin-top: 24px;
        margin-bottom: 32px;
        justify-content: start;
    }
    .review_main-item {
        width: 100%;
        height: 200px;
    }
    .review_main-title {
        font-size: 15px;
        line-height: 1.3;
    }
    .news-item-info {
        font-size: 12px;
    }
    .review_main-stats {
        bottom: 12px;
        right: 12px;
        gap: 10px;
    }
    .review_main-stat-item {
        font-size: 12px;
        gap: 3px;
    }
    .review_main-stats i {
        font-size: 12px;
    }
    .review_main-stat-item span {
        font-size: 12px;
    }
    .blogs-tabs {
        margin-bottom: 24px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .blogs-tabs .nav-link {
        padding: 10px 16px;
        font-size: 1.4rem;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    .review_main__list {
        grid-template-columns: 1fr;
        gap: 16px;
        row-gap: 20px;
    }
    .review_main-item {
        height: 220px;
        max-width: 100%;
    }
    .review_main-title {
        font-size: 16px;
    }
    .review_main-text {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .review_main-item {
        height: 200px;
    }
    .review_main-title {
        font-size: 15px;
    }
    .review_main-stats {
        bottom: 10px;
        right: 10px;
        gap: 8px;
    }
    .review_main-stat-item {
        font-size: 11px;
    }
    .review_main-stats i {
        font-size: 11px;
    }
    .review_main-stat-item span {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .review_main-item {
        height: 180px;
        border-radius: 12px;
    }
    .review_main-title {
        font-size: 14px;
    }
    .review_main-text {
        padding: 10px;
    }
    .review_main-stats {
        bottom: 8px;
        right: 8px;
        gap: 6px;
    }
    .review_main-stat-item {
        font-size: 10px;
    }
    .review_main-stats i {
        font-size: 10px;
    }
    .review_main-stat-item span {
        font-size: 10px;
    }
}
