/* News section — styling shared via the home-section-* classes in home.css. */

.news {
    margin-bottom: var(--theme-space-8);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: var(--theme-space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-item {
    position: relative;
}

.news-admin-toggle {
    position: absolute;
    top: var(--theme-space-2);
    inset-inline-end: var(--theme-space-2);
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--theme-border-subtle);
    border-radius: var(--theme-radius-sm);
    background: var(--theme-surface-raised);
    color: var(--theme-text-secondary);
    cursor: pointer;
}

.news-admin-toggle:hover {
    background: var(--theme-bg-secondary);
    color: var(--theme-text-primary);
}

.news-item-hidden .news-link {
    opacity: 0.45;
}

.news-hidden-badge {
    padding: 0 var(--theme-space-2);
    border: 1px solid var(--theme-border-subtle);
    border-radius: var(--theme-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.news-link {
    display: flex;
    gap: var(--theme-space-3);
    width: 100%;
    padding: var(--theme-space-3);
    border: 1px solid var(--theme-border-subtle);
    border-radius: var(--theme-radius-md);
    background: var(--theme-surface-raised);
    color: var(--theme-text-primary);
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.news-link:hover {
    background: var(--theme-bg-secondary);
    border-color: color-mix(in srgb, var(--theme-color-primary) 30%, var(--theme-border-subtle));
    box-shadow: var(--theme-shadow-md);
    transform: translateY(-1px);
}

.news-image {
    flex-shrink: 0;
    width: 112px;
    height: 84px;
    object-fit: cover;
    border-radius: var(--theme-radius-sm);
}

.news-text {
    display: flex;
    flex-direction: column;
    gap: var(--theme-space-1);
    min-width: 0;
}

.news-item-title {
    font-weight: var(--theme-font-weight-medium, 500);
}

.news-snippet {
    font-size: var(--theme-font-sm);
    color: var(--theme-text-secondary);
    line-height: 1.4;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: var(--theme-space-2);
    font-size: var(--theme-font-xs, 0.75rem);
    color: var(--theme-text-secondary);
}

.news-meta .news-date::before {
    content: '·';
    margin-right: var(--theme-space-2);
}

@media (max-width: 640px) {
    .news-link {
        flex-direction: column;
    }

    .news-image {
        width: 100%;
        height: 140px;
    }
}
