/* News section — public pages */
.news-page-header {
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
}

.news-filter {
    margin-bottom: 2rem;
}

.news-block-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--green-800);
    margin-bottom: 1.25rem;
    padding-right: 0.75rem;
    border-right: 4px solid var(--green-500);
}

.news-featured-block {
    margin-bottom: 2.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.news-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.news-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(10, 77, 38, 0.12);
    border-color: var(--green-300);
}

.news-card-featured {
    border-color: var(--green-400);
}

.news-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--green-50);
    overflow: hidden;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.news-card:hover .news-card-thumb img {
    transform: scale(1.05);
}

.news-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2.5rem;
    opacity: 0.5;
}

.news-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--green-600);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.news-card-body {
    padding: 1.1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.news-card-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.news-card:hover .news-card-body h3 {
    color: var(--green-600);
}

.news-card-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-more {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green-600);
}

/* Detail page */
.news-detail {
    padding: 2rem 0 4rem;
}

.news-back-link {
    display: inline-block;
    color: var(--green-600);
    font-weight: 600;
    margin-bottom: 1rem;
    text-decoration: none;
}

.news-back-link:hover {
    text-decoration: underline;
}

.news-detail-header h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.4;
    margin: 0.5rem 0 1rem;
    color: var(--green-900);
}

.news-detail-badge {
    display: inline-block;
    background: var(--green-600);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.news-detail-image {
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.news-detail-image img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.news-detail-summary {
    background: var(--green-50);
    border-right: 4px solid var(--green-500);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.news-detail-summary p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--green-800);
    font-weight: 500;
    margin: 0;
}

.news-detail-body {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text);
    margin: 2rem 0;
}

.news-detail-body p {
    margin-bottom: 1rem;
}

.news-detail-body img {
    max-width: 100%;
    border-radius: var(--radius);
}

/* Comments */
.news-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.news-comments-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.news-comments-count {
    color: var(--text-muted);
    font-weight: 500;
}

.news-comment-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.news-comment-form h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.news-comment-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.news-comment-closed {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.news-comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-no-comments {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
    background: var(--green-50);
    border-radius: var(--radius);
}

.news-comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.news-comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--green-600);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.news-comment-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.news-comment-top span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.news-comment-content p {
    margin: 0;
    line-height: 1.8;
    color: var(--text);
}

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

.related-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .news-featured-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin comments */
.comments-admin-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-admin-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    background: var(--surface);
}

.comment-admin-item.pending {
    border-right: 4px solid #f59e0b;
}

.comment-admin-item.approved {
    border-right: 4px solid var(--green-500);
}

.comment-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.comment-email {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.comment-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.comment-admin-body {
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.comment-admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.comment-admin-meta a {
    color: var(--green-600);
}

.comment-admin-actions {
    display: flex;
    gap: 0.5rem;
}

.toolbar-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}
