/* Sekcja last_news – przeniesione z inline <style> dla walidacji HTML5 */
#last_news {
    position: relative;
}

#last_news .subtitle span {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

#last_news .subtitle img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

#lastNewsCarousel {
    position: relative;
    overflow: hidden;
    --news-visible: 3;
    --news-gap: 1.5rem;
}

.last-news-track {
    display: flex;
    align-items: stretch;
    gap: var(--news-gap);
    transform: translateX(0);
    transition: none;
}

.last-news-track.is-animating {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card {
    flex: 0 0 calc((100% - (var(--news-visible) - 1) * var(--news-gap)) / var(--news-visible));
    max-width: calc((100% - (var(--news-visible) - 1) * var(--news-gap)) / var(--news-visible));
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 22px 38px -24px rgba(0, 22, 72, 0.35);
    transition: transform 0.32s ease, box-shadow 0.32s ease;
    min-height: 340px;
}

.news-card a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card__background {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
}

.news-card__background-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.news-card__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(200deg, rgba(11, 24, 45, 0.05) 10%, rgba(11, 24, 45, 0.8) 100%);
    z-index: 2;
}

.news-card__title {
    position: relative;
    z-index: 3;
    width: 100%;
    margin: 0;
    padding: 1.45rem 1.4rem 1.35rem;
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1.28;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.last-news-empty {
    margin: 2rem auto 0;
    font-size: 1rem;
    color: #6c757d;
}

@media (max-width: 1200px) {
    #lastNewsCarousel {
        --news-gap: 1.25rem;
    }
}

@media (max-width: 992px) {
    #lastNewsCarousel {
        --news-visible: 2;
        --news-gap: 1.2rem;
    }

    .news-card {
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    #lastNewsCarousel {
        --news-visible: 1;
        --news-gap: 1rem;
    }

    .news-card {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    #lastNewsCarousel {
        --news-gap: 0.875rem;
    }

    .news-card {
        min-height: 280px;
    }
}

.last-news-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.last-news-nav:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.last-news-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.last-news-nav.prev {
    left: 10px;
}

.last-news-nav.next {
    right: 10px;
}

.last-news-nav svg {
    width: 24px;
    height: 24px;
    stroke: #0b1d3a;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.last-news-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 768px) {
    .last-news-nav {
        width: 40px;
        height: 40px;
    }

    .last-news-nav svg {
        width: 20px;
        height: 20px;
    }

    .last-news-nav.prev {
        left: 5px;
    }

    .last-news-nav.next {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .last-news-nav {
        width: 36px;
        height: 36px;
    }

    .last-news-nav svg {
        width: 18px;
        height: 18px;
    }
}
