/**
 * Shared public-site components.
 *
 * These were originally inline in templates/welcome.php, which was fine while
 * the home page was the only thing using them. The newsletter archive
 * (templates/newsletter.php) renders the same cards and the same buttons, and
 * inline styles in one template are invisible to another — the cards came out
 * as bare links. Anything two public pages both use belongs here.
 *
 * Loaded by templates/navs.php after w3-theme.css, so it can rely on the theme
 * variables and still be overridden by a page's own inline block where a page
 * genuinely needs to differ.
 *
 * Colours come from the variables navs.php defines (--accent, --primary,
 * --border, --text-light, --transition, --radius-sm, --shadow-*), so this file
 * follows the site theme rather than restating it.
 */

/* ── Call to action buttons ─────────────────────────────────────────── */
.banner-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(255, 112, 67, 0.3);
    transition: var(--transition);
}

.banner-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(255, 112, 67, 0.4);
    color: #fff;
}

.banner-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 14px 30px;
    border-radius: 50px;
    background: var(--card-bg, #fff);
    color: var(--primary);
    border: 1.5px solid var(--border);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.banner-cta-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ── Eyebrow chip ───────────────────────────────────────────────────── */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 7px 16px;
    border-radius: 50px;
    background: rgba(255, 112, 67, 0.12);
    border: 1px solid rgba(255, 112, 67, 0.24);
    color: #b8431a;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.hero-eyebrow i { font-size: 0.9rem; }

/* ── News / newsletter cards ────────────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm, 16px);
    padding: 1.4rem 1.4rem 1.2rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.news-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.news-tag {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: 5px;
    background: rgba(255, 112, 67, 0.14);
    color: #b8431a;
}

.news-date {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.news-title {
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary);
    margin: 0;
    /* Headlines can run to 50 words; keep cards level at three lines. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-title { color: var(--accent); }

.news-summary {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.62;
    margin: 0;
    /* Summaries can run to 500 words; a card shows the opening lines and
       the link carries the reader to the rest. */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.8rem;
}

.news-source {
    color: var(--text-light);
    font-weight: 600;
}

.news-go {
    color: var(--accent);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.news-go i { font-size: 0.72rem; }

@media (prefers-reduced-motion: reduce) {
    .news-card,
    .banner-cta,
    .banner-cta-secondary { transition: none; }

    .news-card:hover,
    .banner-cta:hover,
    .banner-cta-secondary:hover { transform: none; }
}
