/**
 * Billboard RSS Feed Styles  [RESTYLED TO MATCH itopcharts.com]
 * Class names are UNCHANGED (billboard-feed.php depends on them) — only the
 * visual tokens are changed to match the host site:
 *
 *   Font ........ "Nunito", sans-serif        (was -apple-system)
 *   Accent ...... #317eac  (badge)            (was #000 / #0066cc)
 *   CTA ......... #d6001f red pill, like the chart's "Listen Now" button
 *   Card radius . 10px                          (was 12px, site uses 10px)
 *   Card shadow . 0 0 10px rgba(0,0,0,.1) family, matching the site panels
 *   Muted text .. #595959                       (site's secondary text colour)
 *
 * Layout: lives INSIDE the site's .music-news box (max-width 800px).
 *   - Desktop viewport: 3 columns (~250px cards in the 800px box)
 *   - Tablet (<=1024px): 2 columns
 *   - Phone   (<=600px): 2 columns, description hidden, tighter — this
 *     breakpoint matches the site's own 600px switch where .music-news
 *     becomes display:contents.
 */

.billboard_news_container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;              /* inset so cards don't touch the white panel edge */
    box-sizing: border-box;
    font-family: "Nunito", sans-serif;
}

.billboard_news_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.billboard_news_article {
    background: #fff;
    border: 1px solid #eee;    /* definition on a white panel, no muddy white-on-white shadow */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    transition: box-shadow .3s ease, transform .3s ease;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.billboard_news_article:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    transform: translateY(-2px);
}

.billboard_news_imagelink { display: block; line-height: 0; }

.billboard_news_image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f0f0f0;        /* placeholder tint while lazy-loading */
}

/* Text-only cards: give the content a little more room so they don't look
   truncated next to cards that do have artwork. */
.billboard_news_article--noimg .billboard_news_content { padding-top: 20px; }

.billboard_news_content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* "Billboard" badge — recoloured to the site accent (#317eac). */
.billboard_news_badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #317eac;
    margin-bottom: 10px;
}
.billboard_news_badge::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: #317eac;
    border-radius: 2px;
}

.billboard_news_title {
    font-size: 18px;            /* matches .song p.songTitle */
    font-weight: 800;          /* matches the site's 800-weight titles */
    line-height: 1.35;
    margin: 0 0 10px;
    color: #000;
    font-family: "Nunito", sans-serif;

    /* keep cards visually even */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.billboard_news_title a { color: #000; text-decoration: none; }
.billboard_news_title a:hover { color: #317eac; text-decoration: underline; }

.billboard_news_description {
    font-size: 14px;
    color: #595959;            /* site's secondary text colour */
    line-height: 1.6;
    margin: 0 0 16px;
    flex: 1;
    font-family: "Nunito", sans-serif;
}

/* Action — styled as the chart's red "Listen Now" pill.
   align-self keeps it hugging its text instead of stretching full width. */
.billboard_news_link {
    align-self: flex-start;
    margin-top: auto;
    display: inline-block;
    background: #d6001f;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: "Nunito", sans-serif;
    transition: background .2s ease;
}
.billboard_news_link:hover { background: #b0001a; text-decoration: none; }

/* ---- Tablet / narrow desktop: 3-up is too tight ---- */
@media (max-width: 1024px) {
    .billboard_news_grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .billboard_news_title { font-size: 16px; }
    .billboard_news_image { height: 190px; }
}

/* ---- Phone: 2 columns, matches the site's 600px breakpoint where
        .music-news switches to display:contents ---- */
@media (max-width: 600px) {
    .billboard_news_container { padding: 12px 0; }

    .billboard_news_grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .billboard_news_image { height: 130px; }

    .billboard_news_content { padding: 12px; }

    .billboard_news_badge  { font-size: 11px; margin-bottom: 8px; }
    .billboard_news_badge::before { width: 12px; height: 12px; }

    .billboard_news_title {
        font-size: 14px;       /* matches the site's 14px mobile titles */
        line-height: 1.35;
        margin-bottom: 8px;
    }

    /* At ~165px per card the description costs more height than it earns.
       Title + button is the whole value proposition on a phone. */
    .billboard_news_description { display: none; }

    .billboard_news_link { font-size: 12px; }
}

/* ---- Very small phones: keep 2-up but tighten further ---- */
@media (max-width: 400px) {
    .billboard_news_grid  { gap: 10px; }
    .billboard_news_image { height: 110px; }
    .billboard_news_title { font-size: 13px; }
    .billboard_news_content { padding: 10px; }
}
