/* ===================================================================
   MoreNews — Category Carousel  (mcc = MoreNews Cat Carousel)
   Paste into: Appearance › Customize › Additional CSS
   OR: your child theme's style.css
   =================================================================== */

/* ── Section wrapper ─────────────────────────────────────────── */
.morenews-cat-carousel {
    width: 100%;
    padding: 0 0 30px;
    margin-bottom: 20px;
}

/* Re-use the theme's default-mode card styles */
body.aft-default-mode .morenews-cat-carousel .mcc-card {
    background-color: #ffffff;
    -webkit-box-shadow: 0 4px 16px 0 rgb(0 0 0 / 12%), 0 1px 4px 0 rgb(0 0 0 / 08%);
    box-shadow: 0 4px 16px 0 rgb(0 0 0 / 12%), 0 1px 4px 0 rgb(0 0 0 / 08%);
}
body.aft-dark-mode .morenews-cat-carousel .mcc-card {
    background-color: #252525;
    -webkit-box-shadow: 0 4px 16px 0 rgb(0 0 0 / 40%), 0 1px 4px 0 rgb(0 0 0 / 25%);
    box-shadow: 0 4px 16px 0 rgb(0 0 0 / 40%), 0 1px 4px 0 rgb(0 0 0 / 25%);
}

/* ── Header row ───────────────────────────────────────────────── */
.mcc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0 14px;
    border-bottom: 1px solid rgba(0,0,0,.1);
    margin-bottom: 18px;
}
body.aft-dark-mode .mcc-header {
    border-bottom-color: rgba(255,255,255,.15);
}

.mcc-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
body.aft-dark-mode .mcc-title { color: #fff; }

.mcc-title-bar {
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #d0021b;
    border-radius: 2px;
    flex-shrink: 0;
}

.mcc-view-all {
    font-size: 12px;
    font-weight: 600;
    color: #d0021b;
    text-decoration: none;
    margin-left: 6px;
    white-space: nowrap;
    transition: opacity .15s;
    border-bottom: none !important;
}
.mcc-view-all:hover { opacity: .75; color: #d0021b; }

/* ── Nav buttons ─────────────────────────────────────────────── */
.mcc-nav { display: flex; gap: 5px; flex-shrink: 0; }

.mcc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #d0021b;
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .15s, transform .1s;
    line-height: 1;
}
.mcc-btn:hover          { background: #a80016; transform: scale(1.07); }
.mcc-btn:focus-visible  { outline: 2px solid #d0021b; outline-offset: 2px; }
.mcc-btn[disabled]      { opacity: .35; pointer-events: none; }
.mcc-btn svg            { display: block; pointer-events: none; }

/* ── Clip window ─────────────────────────────────────────────── */
.mcc-window {
    overflow-x: hidden;
    overflow-y: visible;
    position: relative;
    width: 100%;
    padding-bottom: 14px; /* room for card bottom shadow */
}

/* ── Scrolling track ─────────────────────────────────────────── */
.mcc-track {
    display: flex;
    gap: 18px;
    transition: transform .38s cubic-bezier(.25,.46,.45,.94);
    will-change: transform;
}

/* ── Individual slide ────────────────────────────────────────── */
/* Default: 4 cards visible */
.mcc-slide {
    flex: 0 0 calc(25% - 14px);
    min-width: 0;
}

/* ── Card ─────────────────────────────────────────────────────── */
.mcc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: none;
    border-radius: 6px;
    transition: box-shadow .25s, transform .25s;
}
body.aft-dark-mode .mcc-card { border-color: rgba(255,255,255,.08); }
.mcc-card:hover {
    box-shadow: 0 10px 36px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.1) !important;
    transform: translateY(-3px);
}

/* ── Thumbnail ───────────────────────────────────────────────── */
.mcc-thumb-link { display: block; text-decoration: none; }

.mcc-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: #f0f0f0;
}
body.aft-dark-mode .mcc-thumb { background: #3a3a3a; }

.mcc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .32s ease;
}
.mcc-card:hover .mcc-thumb img { transform: scale(1.04); }

.mcc-no-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,#e8e8e8 0%,#d0d0d0 100%);
}

/* ── Format icon ─────────────────────────────────────────────── */
.mcc-fmt-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    background: #d0021b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2;
}

/* ── Category badges ─────────────────────────────────────────── */
.mcc-cats {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 2;
}
.mcc-cat-badge {
    background: #1665CF; /* matches MoreNews primary blue */
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 3px 6px;
    text-decoration: none;
    line-height: 1.4;
    transition: background .15s;
    border-bottom: none !important;
}
.mcc-cat-badge:hover { background: #0f4fa8; color: #fff; }

/* ── Card body ───────────────────────────────────────────────── */
.mcc-body {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.mcc-post-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}
.mcc-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
    border-bottom: none !important;
}
body.aft-dark-mode .mcc-post-title a { color: #fff; }
.mcc-post-title a:hover              { color: #d0021b; }

.mcc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: auto;
}
.mcc-meta-author,
.mcc-meta-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #888;
    line-height: 1;
}
body.aft-dark-mode .mcc-meta-author,
body.aft-dark-mode .mcc-meta-date { color: rgba(255,255,255,.55); }
.mcc-meta-author svg,
.mcc-meta-date svg { flex-shrink: 0; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */

/* Tablet landscape: 3 cards */
@media (max-width: 1100px) {
    .mcc-slide { flex: 0 0 calc(33.333% - 13px); }
}

/* Tablet portrait: 2 cards */
@media (max-width: 768px) {
    .mcc-slide { flex: 0 0 calc(50% - 10px); }
    .mcc-title { font-size: 14px; }
}

/* Mobile: peek at 1.2 cards */
@media (max-width: 480px) {
    .mcc-slide  { flex: 0 0 82%; }
    .mcc-track  { gap: 14px; }
    .morenews-cat-carousel { padding-bottom: 20px; }
}