/*
 * Metro North News Feed – Stylesheet
 * Clean, accessible card layout that works within any theme.
 * Override any of these in your child theme's style.css.
 */

/* ── Container ────────────────────────────────────────────── */
.mn-news-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

/* ── Single card ──────────────────────────────────────────── */
.mn-news-feed__item {
    background: #ffffff;
    border: 1px solid #818181;
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
	padding-bottom: 0 !important;
}


/* ── Featured image ───────────────────────────────────────── */
.mn-news-feed__image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #ffffff;
}

.mn-news-feed__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
	border-radius: 0rem 0rem 6.0882800609%/10.8108108108% 0px !important;
    border: 1px solid #818181;
}

/* ── Content area ─────────────────────────────────────────── */
.mn-news-feed__content {
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Date ─────────────────────────────────────────────────── */
.mn-news-feed__date {
    color: #414141;
    margin: 0 0 0.4rem!important;
    letter-spacing: 0.04em;
}

/* ── Title ────────────────────────────────────────────────── */
.mn-news-feed__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.6rem!important;
}

.mn-news-feed__title a {
    color: #05214d;
    text-decoration: none;
}

.mn-news-feed__title a:hover,
.mn-news-feed__title a:focus {
    color: #05214d;        
    text-decoration: underline;
}

/* ── Excerpt ──────────────────────────────────────────────── */
.mn-news-feed__excerpt {
     color: #000;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
	padding-bottom: 20px;
}

/* ── Error / empty states ─────────────────────────────────── */
.mn-news-feed-error {
    color: #c0392b;
    font-style: italic;
}

.mn-news-feed-no-posts {
    color: #6c757d;
    font-style: italic;
}

/* ── Carousel wrapper (small screens only) ────────────────── */
@media (max-width: 680px) {

    /* Outer wrapper sits in normal flow and clips the sliding track */
    .mn-news-feed-carousel {
        position: relative;
        overflow: hidden;
        margin: 1.5rem 0 0;
    }

    /* The grid becomes a horizontal flex track */
    .mn-news-feed {
        display: flex;
        flex-wrap: nowrap;
        gap: 1rem;
        margin: 0;
        padding: 0 0 0.5rem;
        /* Smooth slide driven by JS via --carousel-offset */
        transform: translateX(var(--carousel-offset, 0px));
        transition: transform 0.35s ease;
        /* Prevent grid's auto-fill taking over */
        grid-template-columns: unset;
    }

    /* Every card: fixed width, full height, no shrink */
    .mn-news-feed__item {
        flex: 0 0 280px;
        width: 280px;
    }

    /* ── Navigation controls ──────────────────────────────── */
    .mn-news-feed-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .mn-news-feed-nav__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.4rem;
        height: 2.4rem;
        border-radius: 50%;
        border: 2px solid #414141;
        background: #ffffff;
        color: #414141;
        cursor: pointer;
        font-size: 2rem;
        line-height: 1;
        transition: background 0.2s ease, color 0.2s ease;
        /* Remove default button styling */
        padding: 0;
        appearance: none;
        -webkit-appearance: none;
    }
	.mn-news-feed-nav__btn span {
    	transform: translateY(-3px); 
	}
    .mn-news-feed-nav__btn:hover,
    .mn-news-feed-nav__btn:focus {
        background: #006298;
        color: #ffffff;
        outline: none;
    }

    .mn-news-feed-nav__btn:disabled {
        border-color: #c8d0d8;
        color: #c8d0d8;
        cursor: default;
        background: #ffffff;
    }

    /* "2 / 5" counter */
    .mn-news-feed-nav__count {
        font-size: 0.85rem;
        color: #414141;
        min-width: 3rem;
        text-align: center;
    }
}

/* ── Categories ───────────────────────────────────────────── */
.mn-news-feed__categories {
   margin: auto 0 0!important;
    font-size: 0.8rem;
    color: #000;
	border-top: 1px solid #eee;
	padding-top: 20px;
}

.mn-news-feed__cat-link {
    color: #000;
    text-decoration: none!important;
	border: 1px solid #000;
	border-radius: 1rem;
	padding: 0.2rem 0.75rem;
	margin-right: 7px;
	white-space: nowrap;
	display: inline-block;
    margin-bottom: 10px;
}

.mn-news-feed__cat-link:hover,
.mn-news-feed__cat-link:focus {
    text-decoration: underline!important;
	color: #fff!important; 
  	background-color: #05214D!important;
}

.mn-news-feed__cat-sep {
     color: #6c757d;
	display: none;
}
