.community-notices-list-section {
    background: var(--mtw-off-white);
    padding: 88px 0 104px;
}

.community-notices-list-container {
    width: min(1480px, calc(100% - 64px));
    margin: 0 auto;
}

.community-notices-list-header {
    max-width: 820px;
    margin-bottom: 44px;
}

.community-notices-list-header h2 {
    margin-bottom: 18px;
}

.community-notices-list-header p:not(.kicker) {
    color: var(--mtw-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.community-notices-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.community-notice-list-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: var(--mtw-white);
    border: 1px solid var(--mtw-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.community-notice-list-card:hover {
    border-color: var(--mtw-red);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.community-notice-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--mtw-light-grey);
    overflow: hidden;
    text-decoration: none;
}

.community-notice-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.community-notice-list-card:hover .community-notice-image img {
    transform: scale(1.03);
}

.community-notice-content {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 28px;
}

.community-notice-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 28px;
    right: 28px;
    height: 4px;
    background: var(--mtw-red);
}

.community-notice-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    padding-top: 8px;
}

.community-notice-date,
.community-notice-category {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 850;
}

.community-notice-date {
    background: var(--mtw-red-soft);
    color: var(--mtw-red-dark);
}

.community-notice-category {
    background: var(--mtw-off-white);
    border: 1px solid var(--mtw-border);
    color: var(--mtw-muted);
}

.community-notice-content h3 {
    margin-bottom: 14px;
    font-size: clamp(1.35rem, 1.55vw, 1.8rem);
    line-height: 1.1;
}

.community-notice-content h3 a {
    color: var(--mtw-black);
    text-decoration: none;
}

.community-notice-content h3 a:hover {
    color: var(--mtw-red);
}

.community-notice-content p {
    color: var(--mtw-muted);
    line-height: 1.7;
    margin-bottom: 28px;
}

.community-notice-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: auto;
    color: var(--mtw-black);
    font-size: 0.94rem;
    font-weight: 850;
    text-decoration: none;
    transition:
        color 0.2s ease,
        gap 0.2s ease;
}

.community-notice-link span {
    color: var(--mtw-red);
}

.community-notice-link:hover {
    color: var(--mtw-red);
    gap: 12px;
}

.community-notices-empty {
    display: grid;
    grid-template-columns: 5px 1fr;
    gap: 26px;
    align-items: center;
    max-width: 820px;
    background: var(--mtw-white);
    border: 1px solid var(--mtw-border);
    border-radius: var(--radius-md);
    padding: 32px;
}

.community-notices-empty-line {
    width: 5px;
    height: 100%;
    min-height: 88px;
    background: var(--mtw-red);
    border-radius: var(--radius-xs);
}

.community-notices-empty h3 {
    margin-bottom: 10px;
    font-size: clamp(1.35rem, 1.7vw, 1.75rem);
}

.community-notices-empty p {
    max-width: 620px;
    color: var(--mtw-muted);
}

@media (max-width: 1200px) {
    .community-notices-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .community-notices-list-container {
        width: min(100% - 32px, 1480px);
    }

    .community-notices-list-section {
        padding: 72px 0 88px;
    }

    .community-notices-grid {
        grid-template-columns: 1fr;
    }

    .community-notices-list-header p:not(.kicker) {
        font-size: 1rem;
    }
}

@media (max-width: 620px) {
    .community-notice-content {
        padding: 24px;
    }

    .community-notice-content::before {
        left: 24px;
        right: 24px;
    }

    .community-notices-empty {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 26px;
    }

    .community-notices-empty-line {
        width: 58px;
        height: 4px;
        min-height: 4px;
    }
}
.community-notice-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: auto;
}

.community-notice-file {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--mtw-border);
    border-radius: 8px;
    color: var(--mtw-muted);
    background: var(--mtw-white);
    font-size: 0.86rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    transition:
        border-color 0.2s ease,
        color 0.2s ease;
}

.community-notice-file:hover {
    border-color: var(--mtw-red);
    color: var(--mtw-red);
}

@media (max-width: 620px) {
    .community-notice-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .community-notice-link,
    .community-notice-file {
        width: 100%;
        justify-content: center;
    }
}
.community-notices-results-summary {
    margin-bottom: 28px;
}

.community-notices-results-summary p {
    color: var(--mtw-muted);
    font-size: 0.95rem;
}

/* Pagination */

.community-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 48px;
}

.community-pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-pagination-link,
.community-pagination-dots {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mtw-border);
    border-radius: 8px;
    background: var(--mtw-white);
    color: var(--mtw-black);
    font-size: 0.92rem;
    font-weight: 850;
    text-decoration: none;
}

.community-pagination-control {
    min-width: 96px;
}

.community-pagination-link:hover {
    border-color: var(--mtw-red);
    color: var(--mtw-red);
}

.community-pagination-link.is-active {
    background: var(--mtw-red);
    border-color: var(--mtw-red);
    color: var(--mtw-white);
}

.community-pagination-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.community-pagination-dots {
    border-color: transparent;
    background: transparent;
    color: var(--mtw-muted);
}

@media (max-width: 900px) {
    .community-pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 620px) {
    .community-pagination {
        justify-content: flex-start;
    }

    .community-pagination-pages {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .community-pagination-control {
        flex: 1;
    }
}

.community-notices-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.community-notices-list-header > div {
    max-width: 880px;
}

.community-notices-archive-btn {
    flex-shrink: 0;
    margin-bottom: 2px;
}

@media (max-width: 900px) {
    .community-notices-list-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .community-notices-archive-btn {
        margin-bottom: 0;
    }
}

@media (max-width: 620px) {
    .community-notices-archive-btn {
        width: 100%;
    }
}