/*
 * Trevor Decker Featured Bar — featured-bar.css  v1.2
 *
 * Visually elevated to feel "featured" while staying on-brand:
 *   - Warm gray section background creates a distinct visual band
 *   - Bold 4px red top border signals importance
 *   - Section heading uses the same red-pill badge as the hero "LATEST" label
 *   - Each card has a red top accent line tying them together as a curated set
 *   - Card titles slightly larger than More Headlines for hierarchy
 */

:root {
    --tdfb-accent:      #cc0000;
    --tdfb-text:        #1a1a1a;
    --tdfb-meta-color:  #888;
    --tdfb-bg:          #f4f4f4;   /* warm gray band — key differentiator */
    --tdfb-border:      #e0e0e0;
    --tdfb-card-bg:     #ffffff;
    --tdfb-gap:         20px;
    --tdfb-max-width:   1100px;
    --tdfb-font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* =====================================================================
   OUTER SECTION — full-width gray band with strong red top signal
   ===================================================================== */
.tdfb-featured-bar {
    width: 100%;
    background: var(--tdfb-bg);
    border-top: 4px solid var(--tdfb-accent);   /* strong red cap — "this matters" */
    border-bottom: 1px solid var(--tdfb-border);
    padding: 20px 0 26px;
    margin: 0 0 28px;
    box-sizing: border-box;
    font-family: var(--tdfb-font);
    clear: both;
}

/* =====================================================================
   INNER WRAPPER
   ===================================================================== */
.tdfb-bar-wrap {
    max-width: var(--tdfb-max-width);
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* =====================================================================
   SECTION HEADING — red filled pill matching the hero "LATEST" badge
   style, so it reads as the same editorial voice, just section-level
   ===================================================================== */
.tdfb-section-heading {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tdfb-section-title {
    display: inline-block;
    background: var(--tdfb-accent);     /* solid red pill — matches hero badge */
    color: #ffffff;
    font-family: var(--tdfb-font);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 2px;
    margin: 0;
    line-height: 1.5;
}

/* Thin rule that extends from the badge to the right edge — feels like
   the heading "owns" the full width of the section */
.tdfb-section-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--tdfb-border);
    display: block;
}

/* =====================================================================
   3-COLUMN CARD GRID
   ===================================================================== */
.tdfb-bar-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--tdfb-gap);
}

/* =====================================================================
   INDIVIDUAL CARD — white on gray, red top accent per card
   ===================================================================== */
.tdfb-card {
    display: flex;
    flex-direction: column;
    background: var(--tdfb-card-bg);
    border-top: 3px solid var(--tdfb-accent);   /* red cap on each card */
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);     /* subtle lift off the gray bg */
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tdfb-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.13);
    transform: translateY(-2px);
}

/* ── Image block ── */
.tdfb-card-img-link {
    display: block;
    overflow: hidden;
}

.tdfb-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #d0d0d0;
    flex-shrink: 0;
}

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

.tdfb-card:hover .tdfb-card-img {
    transform: scale(1.05);
}

.tdfb-no-thumb {
    background: linear-gradient(135deg, #c8c8c8 0%, #a8a8a8 100%);
    width: 100%;
    height: 100%;
}

/* ── Card body ── */
.tdfb-card-body {
    padding: 12px 13px 13px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* ── Category pill — same red badge style as on the rest of the site ── */
.tdfb-cat-label {
    display: inline-block;
    background: var(--tdfb-accent);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 7px;
    margin-bottom: 7px;
    border-radius: 2px;
    align-self: flex-start;
    line-height: 1.6;
}

/* ── Card title — slightly larger than More Headlines (15.5 vs 14.5px)
      to reinforce the hierarchy: featured > headlines             ── */
.tdfb-card-title {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
    color: var(--tdfb-text);
}

.tdfb-card-title a {
    color: inherit;
    text-decoration: none;
}

.tdfb-card-title a:hover {
    color: var(--tdfb-accent);
}

/* ── Author byline ── */
.tdfb-card-meta {
    font-size: 11px;
    color: var(--tdfb-meta-color);
    margin: auto 0 0;
    padding-top: 6px;
}

.tdfb-author {
    font-style: italic;
}

/* =====================================================================
   RESPONSIVE — TABLET
   2-column grid, all cards keep their image
   ===================================================================== */
@media ( max-width: 900px ) {
    .tdfb-bar-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================================
   RESPONSIVE — MOBILE
   Card 1: full image hero treatment (unchanged)
   Cards 2 & 3: image hidden, displayed as compact bold text rows
                separated by a hairline border
   ===================================================================== */
@media ( max-width: 560px ) {

    .tdfb-bar-inner {
        grid-template-columns: 1fr;
        gap: 0;                         /* rows butt up, border acts as divider */
    }

    .tdfb-featured-bar {
        padding: 16px 0 20px;
    }

    /* ── Card 1 — keep full image hero style, add bottom margin ── */
    .tdfb-card:first-child {
        margin-bottom: 14px;
        border-top: 3px solid var(--tdfb-accent);
        box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    }

    /* ── Cards 2 & 3 — strip the image, render as text rows ── */
    .tdfb-card:not(:first-child) {
        flex-direction: row;            /* icon-free horizontal layout */
        align-items: flex-start;
        border-top: 1px solid var(--tdfb-border);
        border-left: 3px solid var(--tdfb-accent);  /* left red rule = "featured" signal */
        box-shadow: none;
        padding: 11px 10px;
        background: var(--tdfb-card-bg);
    }

    /* Hide the image wrapper entirely on text-row cards */
    .tdfb-card:not(:first-child) .tdfb-card-img-link {
        display: none;
    }

    /* Body fills the full row width */
    .tdfb-card:not(:first-child) .tdfb-card-body {
        padding: 0;
        flex: 1;
    }

    /* Category pill stays but tuck it inline before the title */
    .tdfb-card:not(:first-child) .tdfb-cat-label {
        font-size: 9px;
        padding: 1px 6px;
        margin-bottom: 5px;
    }

    /* Title slightly larger on text rows so they feel weighted */
    .tdfb-card:not(:first-child) .tdfb-card-title {
        font-size: 14px;
        font-weight: 800;
        line-height: 1.35;
        margin-bottom: 4px;
    }

    /* Author sits tight beneath the title */
    .tdfb-card:not(:first-child) .tdfb-card-meta {
        margin-top: 2px;
        padding-top: 0;
    }
}
