/* ============================================================
   JVM News Items – Frontend styles
   ============================================================ */

/* ============================================================
   Single news item – page header override
   ============================================================ */

body.jvm-news-item-single #page-header-wrap {
    height: 300px !important;
}

body.jvm-news-item-single #page-header-bg {
    height: 300px !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

body.jvm-news-item-single #page-header-bg .inner-wrap {
    min-height: 300px !important;
}

body.jvm-news-item-single .container-wrap {
    padding-bottom: 60px;
}

/* ============================================================
   Wrapper
   ============================================================ */

.jvm-news-wrapper {
    position: relative;
    width: 100%;
}

/* ============================================================
   Filter pills
   ============================================================ */

.jvm-news-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.jvm-news-filter__pill {
    display: inline-block;
    padding: 6px 16px;
    border: 2px solid #00B8F1;
    border-radius: 100px;
    background: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    line-height: 1.4;
    color: #006BAE;
}

.jvm-news-filter__pill:hover,
.jvm-news-filter__pill--active {
    background: #00B8F1;
    border-color: #00B8F1;
    color: #ffffff;
}

/* ============================================================
   Grid
   ============================================================ */

.jvm-news-grid {
    display: grid;
    grid-template-columns: repeat(var(--jvm-news-cols, 3), 1fr);
    justify-content: center;
    gap: 24px;
}

.jvm-news-grid__item {
    display: flex;
    flex-direction: column;
}

/* ============================================================
   Card
   ============================================================ */

.jvm-news-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

.jvm-news-item__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.jvm-news-item__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: #f0f0f0;
    flex-shrink: 0;
}

.jvm-news-item__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.jvm-news-item:hover .jvm-news-item__image img {
    transform: scale(1.04);
}

.jvm-news-item__image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

.jvm-news-item__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 20px 16px;
    text-align: center;
}

.jvm-news-item__category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2271b1;
    margin-bottom: 0;
    line-height: 1.3;
}

.jvm-news-item__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.jvm-news-item__date {
    font-size: 0.8rem;
    color: #757575;
    line-height: 1.3;
}

.jvm-news-item__title {
    margin: 0 0 10px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 1.35;
    color: #025B91;
}

.jvm-news-item__excerpt {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.6;
    color: #50575e;
    flex: 1;
}

.jvm-news-item__btn {
    display: inline-block;
    align-self: center;
    padding: 3px 32px;
    margin-bottom: 5px;
    border: 2px solid #00B8F1;
    border-radius: 100px;
    background: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    color: #006BAE;
    text-decoration: none;
}

.jvm-news-item__link:hover .jvm-news-item__btn,
.jvm-news-item__btn:hover {
    background: #006BAE;
    border-color: #006BAE;
    color: #ffffff;
}

/* ============================================================
   Carousel
   ============================================================ */

.jvm-news-wrapper--carousel {
    padding: 0;
}

.jvm-news-carousel-outer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.jvm-news-carousel {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.jvm-news-carousel__slide {
    height: auto;
}

.jvm-news-carousel .jvm-news-item {
    height: 100%;
}

.jvm-news-carousel__prev,
.jvm-news-carousel__next {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    opacity: 1;
}

.jvm-news-carousel__prev::after,
.jvm-news-carousel__next::after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2px solid #025B91;
    border-right: 2px solid #025B91;
}

.jvm-news-carousel__prev::after {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.jvm-news-carousel__next::after {
    transform: rotate(45deg);
    margin-right: 4px;
}

.jvm-news-carousel__prev.swiper-button-disabled,
.jvm-news-carousel__next.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
}

/* ============================================================
   Pager / load more
   ============================================================ */

.jvm-news-pager {
    text-align: center;
    margin-top: 32px;
}

body[data-button-style*="slightly_rounded"] button.jvm-news-pager__btn,
.jvm-news-pager__btn {
    display: inline-block;
    padding: 8px 32px;
    border-radius: 100px !important;
    border: 0;
    background: #006BAE;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: #ffffff;
}

body[data-button-style*="slightly_rounded"] button.jvm-news-pager__btn:hover,
.jvm-news-pager__btn:hover {
    background: #0079c5;
    color: #ffffff;
}

.jvm-news-pager__btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ============================================================
   Loading skeleton
   ============================================================ */

.jvm-news-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #757575;
}

.jvm-news-loading::after {
    content: '⋯';
    font-size: 2rem;
    animation: jvmPulse 1s infinite;
}

@keyframes jvmPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1024px) {
    .jvm-news-grid {
        grid-template-columns: repeat(var(--jvm-news-cols-tablet, 2), 1fr);
        gap: 18px;
    }
}

@media (max-width: 640px) {
    .jvm-news-grid {
        grid-template-columns: repeat(var(--jvm-news-cols-mobile, 1), 1fr);
        gap: 16px;
    }

    .jvm-news-wrapper--carousel {
        padding: 0 28px;
    }

    .jvm-news-item__content {
        padding: 14px 16px 16px;
    }

    .jvm-news-filter {
        gap: 6px;
        margin-bottom: 16px;
    }

    .jvm-news-filter__pill {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
}
