/* =========================================================
 * Header / nav — keep menu on a single line as long as possible
 * ========================================================= */

header nav {
    gap: 1rem;
    flex-wrap: nowrap;
}

header nav a {
    white-space: nowrap;
    font-size: 0.95rem;
}

@media (max-width: 1100px) {
    header nav {
        gap: 0.85rem;
        font-size: 0.9rem;
    }
}

/* =========================================================
 * Home flow sections (full-width below the intro/news grid)
 * ========================================================= */

.home-flow-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.home-flow-section:first-of-type {
    margin-top: 2.5rem;
}

/* "View all news" link below the news list */
.news-section-footer {
    margin-top: 1rem;
    text-align: right;
    font-family: "Roboto Mono", monospace;
    font-size: 0.85rem;
}

.news-section-footer a {
    border-bottom: 1px solid transparent;
}

.news-section-footer a:hover {
    border-bottom-color: var(--accent);
}

/* Make the home intro a bit more breathable so it pairs with news */
@media (min-width: 768px) {
    .home-content {
        padding: 1.5rem 0 0;
    }
}

/* =========================================================
 * Content cards section — heading is NOT a link; CTA is separate
 * ========================================================= */

.content-cards-section .home-section-title {
    margin-bottom: 0.4rem;
}

.content-cards-section-lede {
    color: var(--text-light);
    margin-top: -0.25rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.content-cards-section-cta {
    margin-top: 1.25rem;
    text-align: right;
    font-family: "Roboto Mono", monospace;
    font-size: 0.85rem;
}

.content-cards-section-cta a {
    border-bottom: 1px solid transparent;
}

.content-cards-section-cta a:hover {
    border-bottom-color: var(--accent);
}

/* =========================================================
 * Content cards (used on / and /content)
 * ========================================================= */

.content-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Override the global a:hover { border-bottom-color: var(--accent) } so the
 * card itself doesn't get a stray underline from the theme. */
a.content-card,
a.content-card:hover {
    border-bottom: none;
}

.content-card {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 1.75rem 1.5rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow);
    border-top: 4px solid var(--accent);
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
    color: inherit;
    text-decoration: none;
}

.content-card-icon {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    line-height: 1;
}

.content-card-tag {
    display: inline-block;
    align-self: flex-start;
    font-family: "Roboto Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: var(--bg-alt);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.content-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.45;
    margin-bottom: 0.6rem;
}

.content-card-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0 0 1.25rem;
    flex-grow: 1;
}

.content-card-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: "Roboto Mono", monospace;
    font-size: 0.78rem;
    color: var(--text-light);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    word-break: break-all;
}

.content-card-cta i {
    color: var(--accent);
    font-size: 0.85rem;
}
