/* ========================================
   NEWS CAROUSEL - Clean white design
   ======================================== */
.news-carousel
{
    position: relative;
    max-width: var(--vs-container-max);
    margin: 0 auto;
    padding: 0 var(--vs-container-padding);
}

.news-carousel__header
{
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: var(--vs-space-xl);
}

    .news-carousel__header .section-title
    {
        color: var(--vs-light-text);
        margin-bottom: 0;
    }

    .news-carousel__header .section-subtitle
    {
        color: var(--vs-light-text-secondary);
        margin-bottom: 0;
    }

.news-carousel__arrows
{
    display: flex;
    gap: var(--vs-space-sm);
}

.news-carousel__arrow
{
    width: 40px;
    height: 40px;
    border-radius: var(--vs-radius-full);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--vs-light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--vs-transition-fast);
    font-size: 1rem;
    color: var(--vs-light-text-secondary);
    font-weight: 500;
}

    .news-carousel__arrow:hover
    {
        background: var(--vs-light-surface);
        color: var(--vs-light-text);
        border-color: rgba(0, 0, 0, 0.2);
        box-shadow: var(--vs-shadow-sm);
    }

    .news-carousel__arrow:active
    {
        transform: scale(0.95);
    }

.news-carousel__arrow--disabled
{
    opacity: 0.5;
    cursor: not-allowed;
}

    .news-carousel__arrow--disabled:hover
    {
        background: var(--vs-light-bg);
        color: var(--vs-light-text-secondary);
        border-color: rgba(0, 0, 0, 0.1);
        box-shadow: none;
    }

.news-carousel__track
{
    display: flex;
    gap: var(--vs-space-lg);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: var(--vs-space-sm);
}

    .news-carousel__track::-webkit-scrollbar
    {
        display: none;
    }

.news-carousel__view-all
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--vs-primary);
    margin-top: var(--vs-space-xl);
    transition: gap var(--vs-transition-fast), color var(--vs-transition-fast);
    font-size: 0.9375rem;
}

    .news-carousel__view-all:hover
    {
        gap: 10px;
        color: var(--vs-primary-dark);
    }

/* ========================================
   NEWS SECTION CONTAINER
   ======================================== */
.news-section
{
    padding: var(--vs-section-padding) 0;
    background: var(--vs-light-bg);
}

.news-section__header
{
    text-align: center;
    margin-bottom: var(--vs-space-4xl);
    max-width: var(--vs-content-narrow);
    margin-left: auto;
    margin-right: auto;
}

    .news-section__header h2
    {
        margin-bottom: var(--vs-space-md);
    }

    .news-section__header p
    {
        font-size: 1rem;
        color: var(--vs-light-text-secondary);
        line-height: 1.7;
    }

/* ========================================
   NEWS GRID (fallback for desktop)
   ======================================== */
.news-grid
{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--vs-space-lg);
    margin-bottom: var(--vs-space-xl);
}

    /* Ensure news cards are properly sized in grid */
    .news-grid .news-card
    {
        min-width: 100%;
        scroll-snap-align: unset;
    }

/* News card components consolidated in components.css */

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px)
{
    .news-grid
    {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-carousel__track
    {
        gap: var(--vs-space-md);
    }
}

@media (max-width: 650px)
{
     /* Force carousel container to keep the same boxed layout*/ 
    .news-carousel
    {
        max-width: var(--vs-container-max);
        width: 90%;
        margin: 0 auto;
        padding: 0 var(--vs-container-padding);
    }

    /* Ensure track still provides comfortable horizontal padding for cards if needed */
    .news-carousel__track
    {
        gap: var(--vs-space-lg);
        padding-bottom: 0;
        padding: 0.5rem 0.75rem;
    }

    /* Give each card a fixed flex-basis so it does not collapse to mobile width */
    .news-carousel__track .news-card
    {
        flex: 0 0 320px;  fixed card width for this range 
        min-width: 320px;
        max-width: 360px;  optional cap 
        scroll-snap-align: start;
    }

    .news-carousel__header
    {
        flex-direction: column;
        gap: var(--vs-space-md);
        align-items: flex-start;
    }

    .news-carousel__arrows
    {
        /*display: none;*/
    }

    .news-grid
    {
        grid-template-columns: 1fr;
    }

    .news-card
    {
        min-width: 100%;
    }

    .news-section
    {
        padding: var(--vs-section-padding) 0;
    }

    .news-section__header
    {
        margin-bottom: var(--vs-space-3xl);
    }


} /* @media (max-width: 650px) */



@media (max-width: 480px)
{
    /* Carousel cards: viewport-based width for peek-at-next effect */
    .news-carousel__track .news-card
    {
        min-width: 88vw;
    }

    /* Grid cards: full width */
    .news-grid .news-card
    {
        min-width: 100%;
    }

    .news-card__image
    {
        height: 160px;
    }


    .news-card__body
    {
        padding: var(--vs-space-md);
    }

    .news-section__header h2
    {
        font-size: clamp(1.5rem, 1.25rem + 2vw, 2rem);
    }
}




/* Add near end of file: explicit News page grid behavior */
.newscontainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Keep desktop/tablet behaviour up to 650px */
@media (max-width: 650px) {
  .newscontainer-grid {
    grid-template-columns: 1fr !important; /* stack at <=650px */
    gap: 1.25rem;
  }
}

/* Optional: ensure other site-wide 768px rules don't affect these cards */
@media (min-width: 651px) and (max-width: 768px) {
  .newscontainer-grid .news-card {
    min-width: 320px;
    max-width: none;
    width: auto;
  }
}