@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@100..900&display=swap');

* {
    font-family: 'Geologica', sans-serif;
}

.yf-container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1200px;
}

@media (min-width: 576px) {
    .yf-container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .yf-container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .yf-container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .yf-container {
        max-width: 1140px;
    }
}

.news-first-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.news-first-image {
    flex: 2;
}

.news-first-image {
    position: relative;
}

.news-first-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 30px;
}

.news-first-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.news-first-content h2 {
    font-size: 40px;
    margin-bottom: 15px;
}

.news-first-preview {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.news-first-date {
    color: #999;
    font-size: 14px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.news-grid-image {
    position: relative;
}


.c-news-tags-wrapper {
    margin-bottom: 30px;
}

.c-news-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.c-news-tags-item a:hover {
    text-decoration: none;
}
.c-news-tags-item a
{
    background: transparent;
    border: 1px solid #858585;
    border-radius: 12px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #222222;
    font-size: 22px;
    transition: all 0.3s ease;
}

.c-news-tags-item:first-child a,
.c-news-tags-item:first-child {
    background: #FF763F;
    color: white;
    border-color: #FF763F;
    border-radius: 12px;
}

.c-news-tags-item a:hover {
    border-color: #FF763F;
    color: #FF763F;
    text-decoration: none;
}

.c-news-tags-item:first-child a:hover {
    color: white;
    border-color: #FF763F;
}

.c-news-tags-item a:active {
    background: #FF763F;
    color: white;
    border-color: #FF763F;
}

.c-news-tags-sort {
    position: relative;
}

.sort-button {
    background: transparent;
    border: 1px solid #FF763F;
    border-radius: 12px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FF763F;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-button:hover {
    border-color: #FF763F;
    color: #FF763F;
}

.sort-button:active,
.sort-button.active {
    background: #FF763F;
    color: white;
    border-color: #FF763F;
}

.sort-button.active {
    background: #FFEAE2;
    color: #FF763F;
}

.sort-button svg {
    transition: transform 0.3s ease;
}

.sort-button.active svg {
    transform: rotate(180deg);
}

.sort-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
}

.sort-dropdown.show {
    display: block;
}

.sort-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sort-option svg {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sort-option.active svg {
    opacity: 1;
}

.sort-option:hover {
    color: #FF763F;
}

.sort-option:first-child {
    border-radius: 12px 12px 0 0;
}

.sort-option:last-child {
    border-radius: 0 0 12px 12px;
}

.news-grid-preview {
    color: #666;
    font-size: 19px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}
.news-block-splide {
    display: flex;
    overflow: hidden;
    gap: 0px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    &::-webkit-scrollbar {
        display: none;
    }
}
.news-grid-item{
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    .news-grid-content{
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex: 1;
        gap: 12px;
        h3 {
            font-size: 32px;
            line-height: 40px;
            letter-spacing: -0.03em;
            color:#222222;
            margin: 0;
            word-break: break-word;
            white-space: normal;
            text-overflow: ellipsis;
            display: -webkit-box;
            overflow: hidden;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            width: fit-content;
            overflow-wrap: anywhere;
        } 
        .news-grid-preview{
            color: #222222;
            font-size: 19px;
            line-height: 140%;
            letter-spacing: -0.02em;
            font-weight: 300;
            display: -webkit-box;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
            flex-grow: 1;
        }
        .news-grid-date {
                color: #858585;
                font-size: 15px;
                line-height: 19px;
                letter-spacing: -0.02em;
                margin-top: auto;
                padding-top: 16px;
                font-weight: 300;
        }
    }
    .news-grid-image{
        display: flex;
        img {
            width: 100%;
            height: 240px;
            object-fit: cover;
            border-radius: 30px;
        } 
        .news-tag {
            position: absolute;
            top: 20px;
            left: 20px;
            color: #FF763F;
            background: #FFFFFFCC;
            letter-spacing: -0.03em;
            padding: 6px 18px 8px 18px;
            border-radius: 40px;
            font-size: 20px;
            line-height: 1em;
            font-weight: 400;
        }
    }
    &:hover, &:focus, &:active {
        text-decoration: none;
        .news-grid-image{
            .news-tag {
                background: #FF763F;
                color: white;
            }
        }
        .news-grid-content{
            h3 {
                text-decoration: none;
                color: #FF763F;
            } 
            .news-grid-preview{
                text-decoration: none;
                color: #FF763F;
            }
            .news-grid-date {
                text-decoration: none;
            }
        }
    }
}

@media (max-width: 991px) {
    .news-block-splide {
        margin-left: 0px;
    }
    .news-first-item {
        flex-direction: column;
    }

    .news-first-image {
        flex: none;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-grid-preview{
        font-size: 19px;
        line-height: 130%;
        letter-spacing: 0em;
    }
    .news-grid-date {
        line-height: 18.8px;
    }
}

.news-load-more {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    background: #222222;
    color: white;
    border: none;
    border-radius: 40.5px;
    padding: 9px 40px;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.3s ease;
    margin-top: 50px;
}

.load-more-btn:hover {
    opacity: 0.8;
}

.telegram-subscribe {
    background: #FF763F;
    border-radius: 30px;
    height: 452px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: start;
    padding: 30px;
    text-align: left;
    position: relative;
    overflow: hidden;
    background-image: url('/images/svg/Union.svg');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 170px auto;
}

.telegram-subscribe h3 {
    color: white;
    font-size: 32px;
    margin-bottom: 20px;
}

.telegram-subscribe p {
    color: white;
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    width: 220px;
}

.telegram-btn:hover {
    opacity: 0.8;
}
.telegram-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: #222222;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.2s ease;
    background-image: url('/images/svg/icon_telegram.svg');
    background-repeat: no-repeat;
    background-position: 7px center;
    background-size: 35px auto;
    padding-left: 52px;
    align-self: center;

}

.telegram-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: #FF763F;
}

.btn-style {
    border: none;
    border-radius: 40.5px;
    padding: 17px 40px;
    cursor: pointer;
    font-size: 24px;
    letter-spacing: -0.03em;
    line-height: normal;
    font-weight: 400;
    transition: opacity 0.3s ease;
    margin-top: 0px;
    height: fit-content;
    width: fit-content;
    margin-top: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}
.secondary-btn{
    background: #222222;
    color: white;
    &:hover {
        text-decoration: none;
        color: white;
        background: #404040;
    }
}

@media (max-width: 991px) {
    /* Owl Carousel стили */
    .news-grid.owl-carousel .owl-nav {
        text-align: center;
        margin-top: 20px;
    }

    .news-grid.owl-carousel .owl-nav button {
        background: #FF763F !important;
        color: white !important;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin: 0 5px;
    }

    .news-grid.owl-carousel .owl-nav button:hover {
        background: #e55a2b !important;
    }

    .news-grid.owl-carousel .owl-stage-outer {
        padding: 0 15px;
    }

    .news-grid.owl-carousel .owl-item {
        display: flex !important;
    }
}
