/* =========================================================
   NEWS LOOP
   ========================================================= */

.news-loop {
    position: relative;
    width: min(100%, 1180px);
    margin-inline: auto;
    padding: 20px 48px 86px;
}

.news-loop__viewport {
    overflow: hidden;
    padding: 18px 0 28px;
    margin: -18px 0 -28px;
}

.news-loop__track {
    display: flex;
    align-items: stretch;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.news-loop__slide {
    box-sizing: border-box;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.news-loop-card {
    min-width: 0;
}

.news-loop-card__link {
    display: flex;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    flex-direction: column;
    background: transparent;
    color: #000;
    text-decoration: none;
    transition:
        background-color 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-loop-card__image-wrap {
    display: block;
    height: 205px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    background: #eee;
}

.news-loop-card__image {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-loop-card__body {
    display: flex;
    min-height: 215px;
    padding: 15px 16px 26px;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
}

.news-loop-card__date {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #777;
    font-size: 11px;
    line-height: 1.4;
}

.news-loop-card__date > span {
    color: #B38A05;
    font-size: 12px;
}

.news-loop-card__title {
    display: block;
    margin-top: 14px;
    color: #B38A05;
    font-family: "Prompt", sans-serif;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 500;
}

.news-loop-card__excerpt {
    display: -webkit-box;
    margin-top: 12px;
    overflow: hidden;
    color: #222;
    font-family: "Prompt", sans-serif;
    font-size: 15px;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.news-loop-card__read-more,
.news-loop__archive-link {
    position: relative;
    isolation: isolate;
    display: inline-block;
    padding: 1px 3px;
    color: #000;
    font-family: "Prompt", sans-serif;
    font-size: 15px;
    line-height: normal;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.35s ease;
}

.news-loop-card__read-more {
    margin-top: auto;
}

.news-loop-card__read-more::after,
.news-loop__archive-link::after {
    content: "";
    position: absolute;
    right: 0;
    top: calc(50% + 4px);
    bottom: auto;
    left: 0;
    z-index: -1;
    height: 5px;
    background: #B38A05;
    transition:
        height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        right 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        top 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-loop-card__link:hover,
.news-loop-card__link:focus-visible {
    background: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.news-loop-card__link:hover .news-loop-card__image,
.news-loop-card__link:focus-visible .news-loop-card__image {
    transform: scale(1.04);
}

.news-loop-card__link:hover .news-loop-card__read-more,
.news-loop-card__link:focus-visible .news-loop-card__read-more,
.news-loop__archive-link:hover,
.news-loop__archive-link:focus-visible {
    color: #fff;
}

.news-loop-card__link:hover .news-loop-card__read-more::after,
.news-loop-card__link:focus-visible .news-loop-card__read-more::after,
.news-loop__archive-link:hover::after,
.news-loop__archive-link:focus-visible::after {
    right: -5px;
    top: 0;
    left: -5px;
    height: 100%;
}


/* Controls */

.news-loop__arrow {
    position: absolute;
    top: 43%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #B38A05;
    border-radius: 50%;
    background: #fff;
    color: #B38A05;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.news-loop__arrow--prev {
    left: 0;
}

.news-loop__arrow--next {
    right: 0;
}

.news-loop__arrow:hover,
.news-loop__arrow:focus-visible {
    background: #B38A05;
    color: #fff;
}

.news-loop__arrow[disabled] {
    opacity: 0.35;
    cursor: default;
}

.news-loop__dots {
    position: absolute;
    right: 0;
    bottom: 52px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.news-loop__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #999;
    cursor: pointer;
}

.news-loop__dot.is-active {
    background: #333;
}

.news-loop__archive {
    position: absolute;
    right: 0;
    bottom: 5px;
    left: 0;
    text-align: center;
}

.news-loop:not(.is-ready) .news-loop__track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.news-loop:not(.is-ready) .news-loop__arrow,
.news-loop:not(.is-ready) .news-loop__dots {
    display: none;
}

@media only screen and (max-width: 959px) {
    .news-loop__slide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-loop-card__image-wrap {
        height: 220px;
    }
}

@media only screen and (max-width: 575px) {
    .news-loop {
        padding-inline: 34px;
    }

    .news-loop__slide {
        display: block;
    }

    .news-loop-card__image-wrap {
        height: 215px;
    }

    .news-loop-card__link:hover,
    .news-loop-card__link:focus-visible {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-loop__track,
    .news-loop-card__link,
    .news-loop-card__image,
    .news-loop-card__read-more::after,
    .news-loop__archive-link::after {
        transition-duration: 0.01ms !important;
    }
}
