/*
 * Home page news feed (includes/news.php, js/news.js).
 *
 * Cards in the same palette as .fm-card in fm.css: a dark translucent panel
 * over the home photograph, copper accents, warm off-white text.
 */

.fm-news {
    --fm-copper: #cb9662;
    --fm-copper-light: #e2ac74;
    --fm-copper-pale: #f2c99f;
    --fm-ink: #f2efe6;
    --fm-panel: rgba(18, 18, 18, 0.78);
    --fm-edge: rgba(203, 150, 98, 0.35);

    width: 100%;
    max-width: 760px;
    margin: clamp(1.5rem, 5vh, 3rem) auto;
    padding: 0 1rem;
    color: var(--fm-ink);
    font-family: TitilliumText-Regular, var(--fm-font, system-ui, sans-serif);
}

.fm-news-heading {
    margin: 0 0 1.25rem;
    padding: 0.6rem 1.1rem;
    background: var(--fm-panel);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-left: 3px solid var(--fm-copper);
    border-radius: 6px;
    font-family: TitilliumText-Bold, var(--fm-font, system-ui, sans-serif);
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: normal;
    color: var(--fm-ink);
}

.fm-news-list {
    display: grid;
    gap: 1.25rem;
}


/* One post --------------------------------------------------------- */

.fm-news-item {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
    background: var(--fm-panel);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid var(--fm-edge);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.fm-news-item.no-image {
    grid-template-columns: minmax(0, 1fr);
}

.fm-news-media {
    display: block;
    background: #111;
}

.fm-news-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 165px;
    object-fit: cover;
}

.fm-news-body {
    min-width: 0;
    padding: 1rem 1.25rem 1.1rem;
}

.fm-news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.85rem;
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    line-height: 1.4;
}

.fm-news-blogs {
    color: var(--fm-copper-light);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.fm-news-meta time {
    color: rgba(242, 239, 230, 0.75);
}

.fm-news-title {
    margin: 0 0 0.5rem;
    font-family: TitilliumText-Bold, var(--fm-font, system-ui, sans-serif);
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    font-weight: normal;
    line-height: 1.3;
}

.fm-news-title a {
    color: var(--fm-ink) !important;
    text-decoration: none;
}

.fm-news-title a:hover {
    color: var(--fm-copper-pale) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fm-news-excerpt {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--fm-ink);
}

.fm-news-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
}

.fm-news-cats li {
    padding: 0.05rem 0.55rem;
    border: 1px solid rgba(203, 150, 98, 0.5);
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--fm-copper-pale);
}

.fm-news-read {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(242, 239, 230, 0.75);
}

.fm-news-read a,
.fm-news-back a {
    color: var(--fm-copper-light) !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fm-news-read a:hover,
.fm-news-back a:hover {
    color: var(--fm-copper-pale) !important;
}


/* More / end ------------------------------------------------------ */

.fm-news-more {
    display: block;
    width: max-content;
    max-width: 100%;
    margin: 1.5rem auto 0;
    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    background: var(--fm-copper);
    color: #1a1a1a !important;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.fm-news-more:hover {
    background: var(--fm-copper-light);
}

.fm-news-more[aria-disabled="true"] {
    opacity: 0.75;
    cursor: progress;
}

.fm-news-end,
.fm-news-back {
    width: max-content;
    max-width: 100%;
    margin: 1.5rem auto 0;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: var(--fm-panel);
    font-size: 0.9rem;
    text-align: center;
    color: var(--fm-ink);
}

.fm-news-back {
    margin: 0 auto 1.25rem;
}

/* Status messages are for screen readers; the button text says the same */
.fm-news-status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


/* Focus ------------------------------------------------------------ */

.fm-news a:focus-visible,
.fm-news-item:focus-visible {
    outline: 2px solid var(--fm-copper-pale);
    outline-offset: 3px;
}

/* Focus moved here by script after "More posts": show where it went */
.fm-news-item:focus {
    outline: 2px solid var(--fm-copper-pale);
    outline-offset: 3px;
}


/* Phones: picture above the text ---------------------------------- */

@media (max-width: 575.98px) {
    .fm-news {
        padding: 0 0.75rem;
    }

    .fm-news-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .fm-news-media img {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .fm-news-body {
        padding: 0.85rem 1rem 1rem;
    }
}
