﻿.news-carousel {
    margin: 24px 0;
    position: relative;
}

/* Header */
.news-carousel__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.news-carousel__title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.news-carousel__all {
    text-decoration: none;
    font-weight: 600;
}

/* Viewport: hide scrollbar */
.news-carousel__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 6px 16px 18px; /* was 6px 2px 18px */
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
}

    .news-carousel__viewport::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Edge */
    }

    .news-carousel__viewport.is-animating {
        scroll-snap-type: none !important;
    }

/* Track */
.news-carousel__track {
    display: flex;
    gap: 22px;
    padding: 0; /* viewport already pads */
}

/* Tiles: show 2 at a time */
.news-tile {
    flex: 0 0 calc((100% - 22px) / 2);
    min-width: 420px; /* prevents absurd shrinking */
    scroll-snap-align: start;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(0,0,0,.12);
    overflow: hidden;
}

/* Internal card layout */
.news-tile__link {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    min-height: 260px;
    color: inherit;
    text-decoration: none;
}

.news-tile__text {
    padding: 26px 26px 22px;
}

.news-tile__title {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.15;
}

.news-tile__date {
    display: inline-block;
    margin-bottom: 10px;
    opacity: .75;
}

.news-tile__summary {
    opacity: .9;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .news-tile__summary p {
        margin: 0 0 8px;
    }

.news-tile__cta {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid rgba(0,0,0,.25);
    border-radius: 999px;
    font-weight: 700;
    width: fit-content;
}

/* Media */
.news-tile__media {
    position: relative;
    background: #f3f3f3;
}

.news-tile__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-tile__quote {
    position: absolute;
    right: 18px;
    bottom: 10px;
    font-size: 120px;
    line-height: 1;
    font-weight: 900;
    color: #e60000;
    pointer-events: none;
}

/* Overlay controls */
.news-carousel__controls {
    position: absolute;
    left: -22px; /* push outside */
    right: -22px; /* push outside */
    top: 56%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0;
    z-index: 5;
}


.news-carousel__ctrl {
    pointer-events: auto;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.25);
    background: rgba(255,255,255,.92);
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

    .news-carousel__ctrl:disabled {
        opacity: .4;
        cursor: default;
        box-shadow: none;
    }

/* Empty state */
.news-carousel__empty {
    padding: 12px;
    border: 1px dashed rgba(0,0,0,.35);
    border-radius: 12px;
}

/* Responsive: 1 tile on smaller screens */
@media (max-width: 900px) {
    .news-tile {
        flex: 0 0 92vw;
        min-width: 0;
    }

    .news-carousel__controls {
        top: 60%;
    }
}

/* Smooth tile hover + subtle lift */
.news-tile {
    transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms cubic-bezier(.2,.8,.2,1);
}

    .news-tile:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 34px rgba(0,0,0,.16);
    }

.news-carousel__ctrl {
    transition: transform 180ms cubic-bezier(.2,.8,.2,1), background 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms cubic-bezier(.2,.8,.2,1);
}

    .news-carousel__ctrl:hover {
        transform: scale(1.06);
        background: rgba(255,255,255,1);
        box-shadow: 0 10px 22px rgba(0,0,0,.22);
    }
