.news-section h4 {
    font-family: "Roboto", sans-serif;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 7% !important;
    line-height: 150%;
    padding: 10px 0;
}

.news-section .tabs-container {
    /* margin-top: 40px; */
    position: relative;
    height: 40px;
    background: #154279;
}

.news-section .tabs-container .tabs {
    display: flex;
    position: absolute;
    left: 6px;
    top: 6px;
    height: 28px;
}

.news-section .tabs-container .tabs .tab {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 10px;
    height: 28px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.news-section .tabs-container .tabs .tab .tab-text {
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0.05em;
    color: #fff;
}

/*gallery*/
.news-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    /* две равные по высоте строки */
    gap: 0;
    height: 380px;
    overflow: hidden;
    /* или фиксированная высота, например 600px */
    /* min-height: 600px; минимальная высота контейнера */
}
.news-item {
  background-color: #022456;
}
.news-big-item {
    grid-row: 1 / span 2;
    position: relative;
    overflow: hidden;
    width: 570px;
    height: inherit;
}

.news-small-items {
    width: 540px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* две колонки равной ширины */

    grid-template-rows: 1fr 1fr;
    gap: 0;
}

.news-small-item {
    position: relative;
    overflow: hidden;
    height: 190px;
}

.news-big-item a,
.news-small-item a {
    display: contents;
    color: white;
    text-decoration: none;
    position: relative;
    font-family: 'Roboto', sans-serif;
    height: inherit;
}

.news-big-item img,
.news-small-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

.news-big-item span.news-date {
    bottom: 80px;
}

.news-small-item span.news-date {
    bottom: 58px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.news-big-item span.news-date,
.news-small-item span.news-date {
    z-index: 3;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
    margin: 0;
}

.news-big-item h2 {
    font-size: 20px !important;
    font-weight: 500;
    line-height: normal;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
    font-family: "Roboto", sans-serif;

    z-index: 3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    padding: 0 !important;
}

.news-big-item .news-overlay {
    height: 30%;
    padding: 15px 30px;
}

.news-small-item .news-overlay {
    height: 45%;
    padding: 15px;
}

.news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    height: 45%;
    z-index: 3;
    transition: opacity 0.3s ease;
}

.news-small-item h3 {
    z-index: 3;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
    font-size: 12px;
    margin-bottom: 5px;
    font-family: "Roboto", sans-serif;
    font-weight: 600;
    line-height: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    padding: 0 !important;
}

/* Затемнение для читаемости текста */
.news-big-item a::before,
.news-small-item a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 60%);
    z-index: 2;
}

.news-big-item:hover a::before,
.news-small-item:hover a::before {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 30%, transparent 100%);
}

@media (min-width: 769px) {
    #mobile-galery {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .news-gallery {
        display: none !important;
    }

    .title {
        font-size: 20px;
        padding: 10px;
    }

    .news-section .tabs-container {
        display: none;
    }

    .news-section h4 {
        font-size: 20px;
        padding: 10px;
    }

    #mobile-galery .news-carousel {
        background: #f1f1f1;
        height: 280px;
        width: 100%;
        position: relative;
        perspective: 1000px;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding: 10px 20px;
        gap: 16px;

        /* Скрытие горизонтального скроллбара */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    #mobile-galery .news-carousel .news-small-item {
        background: #f1f1f1;
        height: 100%;
        /* уменьшена с 180 для совпадения с остальными стилями */
        width: calc(100% - 40px);
        position: relative;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transform: scale(0.9);
        transition: transform 0.3s ease, opacity 0.3s ease;
        /* Удалить flex, overflow, scroll стили */
        display: block;
        /*overflow: visible;*/
        flex: 0 0 auto;
        /* Можно оставить для flex-контейнера */
        transition: transform 0.3s ease;
        transform: scale(0.9);
    }

    #mobile-galery .news-carousel::-webkit-scrollbar {
        display: none !important;
        /* Chrome, Safari, Opera */
    }


    .news-small-item.active {
        transform: scale(1) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
        z-index: 10;
        /* чтобы выделенный элемент был поверх */
    }

    #mobile-galery .news-carousel .news-small-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 1;
    }

    #mobile-galery .news-carousel .news-small-item .news-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px;
        background: rgba(0, 0, 0, 0.5);
        color: #fff;
        box-sizing: border-box;
    }

    #mobile-galery .news-date {
        font-size: 0.8rem;
        display: block;
        margin-bottom: 4px;
    }

    #mobile-galery .news-small-item h3 {
        margin: 0;
        font-size: 1rem;
        line-height: 1.2;
    }
}

@media (max-width: 600px) {
    #mobile-galery .news-carousel {
        height: 200px;
    }
}