/* custom.css */

.news-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .news-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.news-card {
    background: rgba(24, 23, 32, 0.95);
    border-radius: 1rem;
    border: 1px solid rgba(77, 63, 50, 0.6);
    box-shadow: 0 0.4375rem 3.375rem rgba(36, 30, 10, 0.35);
    overflow: hidden;
}

.news-card__inner {
    display: flex;
    align-items: stretch;
    min-height: 210px;
    max-height: 230px;
}

.news-card__image-link {
    display: block;
    flex: 0 0 230px;
    max-width: 230px;
    overflow: hidden;
}

.news-card__image {
    width: 230px;
    height: 230px;
    object-fit: cover;
    display: block;
}

.news-card__body {
    flex: 1 1 auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.news-card__date {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-0);
    color: rgba(240, 225, 154, 0.9);
}

.news-card__title {
    margin: 0.25rem 0 0.25rem 0;
}

.news-card__subtitle {
    font-size: 0.875rem;
    line-height: 1.4;
    color: #aaaaaa;
    font-family: var(--font-2);
}

.news-card__footer {
    margin-top: 0.75rem;
}

@media (max-width: 719px) {
    .news-card__inner {
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
        max-height: none;
    }

    .news-card__image-link {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .news-card__image {
        width: 100%;
        height: auto;
    }
}



.news-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.news-filter__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(77, 63, 50, 0.8);
    font-family: var(--font-0);
    font-size: 0.9rem;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(var(--color-0), 0.8);
    background: #181720;
    transition: 0.2s all;
    min-width: 8rem;
    overflow: hidden;
}

.news-filter__btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(var(--color-accent), 0.3), transparent 60%);
    opacity: 0;
    transition: 0.2s opacity;
    pointer-events: none;
}

.news-filter__btn:hover {
    color: rgba(var(--color-0), 1);
    border-color: rgba(var(--color-accent), 1);
    transform: translateY(-1px);
}

.news-filter__btn_active {
    border-color: rgba(var(--color-accent), 1);
    color: rgba(var(--color-1), 1);
    background: #f0e19a;
    background: linear-gradient(135deg, rgba(var(--color-accent), 1), rgba(255, 255, 255, 0.9));
    box-shadow: 0 0.25rem 1.5rem rgba(0, 0, 0, 0.5);
}

.news-filter__btn_active::before {
    opacity: 1;
}

.news-filter__current {
    text-align: center;
    margin-bottom: 1.75rem;
    font-family: var(--font-2);
    font-size: 0.875rem;
    color: rgba(var(--color-0), 0.75);
}

.news-filter__current span {
    color: rgba(var(--color-accent), 1);
}

.news-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.news-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-family: var(--font-0);
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(24, 23, 32, 0.9);
    color: rgba(var(--color-0), 0.9);
}

.news-card__badge_news {
    border-color: rgba(0, 187, 0, 0.5);
    background: rgba(0, 187, 0, 0.18);
}

.news-card__badge_update {
    border-color: rgba(0, 136, 255, 0.6);
    background: rgba(0, 136, 255, 0.2);
}

.news-card__badge_event {
    border-color: rgba(255, 165, 0, 0.7);
    background: rgba(255, 165, 0, 0.2);
}


.preload__items {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-gap: 1.25rem;
    gap: 1.25rem;
    margin-top: 0.9375rem;
}

.preload__item {
    width: 1.6875rem;
    height: 1.6875rem;
    background-color: transparent;
    background-image: url(../images/preload/item-decor.png);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;

    opacity: 0;
    transform: translateY(1rem);
    will-change: transform, opacity;
    animation-name: preloadStar;
    animation-duration: 2.0s;
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.preload__items .preload__item:nth-child(1) {
    animation-delay: 0s;
}

.preload__items .preload__item:nth-child(2) {
    animation-delay: 0.2s;
}

.preload__items:nth-of-type(2) .preload__item:nth-child(1) {
    animation-delay: 0.4s;
}

.preload__items:nth-of-type(2) .preload__item:nth-child(2) {
    animation-delay: 0.6s;
}

@keyframes preloadStar {
    0% {
        transform: translateY(1rem);
        opacity: 0;
    }
    25% {
        transform: translateY(0rem);
        opacity: 1;
    }
    50% {
        transform: translateY(-1rem);
        opacity: 0;
    }
    100% {
        transform: translateY(1rem);
        opacity: 0;
    }
}
