﻿/* =========================
   Tabs (existing)
   ========================= */
:root {
    --announcements-tab-gap: 12px;
    --announcements-active: #0d6efd; /* swap to #77DD77 for brand-green active */
    --announcements-hover: #77DD77;
    --ft-green: #77DD77;
    --card-radius: 14px;
    --card-shadow: 0 8px 22px rgba(0,0,0,.06);
    /* Layout knobs */
    --content-max: 1400px;
    --gap: 24px;
    /* Menu theming */
    --menu-bg: #fff;
    --menu-border: #e9eee9;
    --menu-accent: #77DD77;
    --menu-hover: #f3fbf3;
    --menu-text: #111;
    --menu-muted: #666;
}

.announcements-tabs {
    display: flex;
    gap: var(--announcements-tab-gap);
    border-bottom: none;
    margin-top: 8px;
    align-items: stretch;
    width: 100%;
}

    .announcements-tabs .nav-item {
        flex: 1 1 0 !important;
        display: flex;
        min-width: 0;
    }

    .announcements-tabs .nav-link {
        flex: 1 1 auto;
        width: 100%;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        text-align: center;
        font-weight: 600;
        line-height: 1.2;
        padding: 12px 8px;
        background: transparent;
        border: none;
        border-bottom: 3px solid transparent;
        color: #333;
        transition: border-color .2s, color .2s;
        border-radius: 0;
        min-height: 60px;
        white-space: normal;
        word-break: keep-all;
    }

        .announcements-tabs .nav-link.active {
            border-bottom: 4px solid var(--announcements-active);
            color: var(--announcements-active);
        }

        .announcements-tabs .nav-link:not(.active):hover {
            border-bottom: 3px solid var(--announcements-hover);
            color: #000;
        }

.announcements-tabpane {
    padding-top: 16px;
}

@media (max-width: 576px) {
    :root {
        --announcements-tab-gap: 8px;
    }

    .announcements-tabs .nav-link {
        padding: 10px 6px;
        min-height: 56px;
    }
}

/* =========================
   Survivor News – layout
   ========================= */
.news-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.home-content.news-wrap,
.news-wrap {
    max-width: var(--content-max);
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px;
}

.news-heading {
    margin: 6px 0 12px;
}

.empty-state {
    color: #666;
    padding: 24px 0;
}

/* Topic card (centered) */
#survivor .topic-card {
    position: relative; /* for dropdown positioning */
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid #ececec;
    box-shadow: var(--card-shadow);
    overflow: visible; /* allow menu to float */
}

/* Title row as control (title + caret side-by-side on the left) */
.topic-card__header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* was: space-between */
    gap: 8px; /* was: 12px */
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(180deg, #fafafa, #fff);
    cursor: pointer;
    user-select: none;
}

.topic-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .01em;
    color: #1c1c1c; /* stays dark on hover */
    margin: 0;
}

.topic-caret {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-left: 4px; /* NEW: tuck it next to the title */
    color: #333;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    transition: transform .18s ease;
}

.topic-card__header:hover {
    background: #fafafa;
    border-bottom-color: #eaeaea;
}

.topic-card__header[aria-expanded="true"] .topic-caret {
    transform: rotate(180deg);
}

/* Custom dropdown menu (themed) */
.topic-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 0; /* JS sets to header height on open */
    background: var(--menu-bg);
    border: 1px solid var(--menu-border);
    border-top: 3px solid var(--menu-accent);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,.10);
    padding: 8px;
    z-index: 1000; /* ensure above content */
    display: none;
}

    .topic-menu.is-open {
        display: block;
    }

.topic-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--menu-text);
    font-weight: 700;
    text-align: left;
    border-radius: 10px;
    cursor: pointer;
}

    .topic-option:hover,
    .topic-option:focus {
        background: var(--menu-hover);
        outline: none;
    }

    .topic-option[aria-checked="true"] {
        background: #fff;
        position: relative;
    }

        .topic-option[aria-checked="true"]::before {
            content: "";
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: var(--menu-accent);
            flex: 0 0 8px;
        }

/* Body/panels */
.topic-card__body {
    padding: 16px;
}

.topic-panel.is-hidden {
    display: none !important;
}

/* =========================
   Video grid – FLEX so the last row centers
   Breakpoints: 1 → 2 → 3 → 4 columns
   ========================= */
.video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    justify-content: center; /* centers incomplete final row */
    width: 100%;
}

/* Card widths per breakpoint */
.video-card {
    flex: 0 1 100%;
}
/* mobile: 1 per row */
@media (min-width: 640px) {
    .video-card {
        flex-basis: calc((100% - var(--gap)) / 2);
    }
}

@media (min-width: 992px) {
    .video-card {
        flex-basis: calc((100% - 2 * var(--gap)) / 3);
    }
}

@media (min-width: 1200px) {
    .video-card {
        flex-basis: calc((100% - 3 * var(--gap)) / 4);
    }
}

/* Card chrome */
.video-card {
    background: #fff;
    border: 1px solid #eef0ee;
    border-radius: var(--card-radius);
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
    overflow: hidden;
    transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

    .video-card:hover {
        border-color: var(--ft-green);
        box-shadow: 0 10px 24px rgba(0,0,0,.08);
        transform: translateY(-1px);
    }

/* Real iframe so native YT controls + title are visible */
.yt-iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000;
}

/* =========================
   Article cards (same grid rules)
   ========================= */
.article-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    justify-content: center; /* center partial last row */
    width: 100%;
}

.article-card {
    flex: 0 1 100%;
}
/* mobile 1 col */

@media (min-width: 640px) {
    .article-card {
        flex-basis: calc((100% - var(--gap)) / 2);
    }
}

@media (min-width: 992px) {
    .article-card {
        flex-basis: calc((100% - 2 * var(--gap)) / 3);
    }
}

@media (min-width: 1200px) {
    .article-card {
        flex-basis: calc((100% - 3 * var(--gap)) / 4);
    }
}

.article-card {
    background: #fff;
    border: 1px solid #eef0ee;
    border-radius: var(--card-radius);
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
    overflow: hidden;
    transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

    .article-card:hover {
        border-color: var(--ft-green);
        box-shadow: 0 10px 24px rgba(0,0,0,.08);
        transform: translateY(-1px);
    }

.article-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card__thumb {
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
}

    .article-card__thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.article-card__thumb--placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dfeade, #cfe0cf);
}

.article-card__body {
    padding: 12px 14px 14px;
}

.article-card__title {
    font-size: 18px;
    line-height: 1.25;
    margin: 0 0 6px;
    font-weight: 800;
}

.article-card__teaser {
    font-size: 14px;
    line-height: 1.45;
    color: #333;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__meta {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .04em;
}
