:root {
    --announcement-card-radius: 12px;
    --announcement-btn-radius: 24px;
    --announcement-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.announcements-container {
    width: 100%;
    padding-top: calc(var(--header-height) + 2.5rem);
    min-height: calc(100vh + 50vh);
    /* Keep footer below until scrolling past all posts */
    padding-bottom: 4rem;
}


.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
    gap: 1.5rem;
}

.announcement-header .header-left {
    flex: 1;
}

.announcement-header .header-left h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.announcement-header .header-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.announcement-header .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}


.date-filter-dropdown {
    position: relative;
}

.filter-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.filter-dropdown-trigger:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-dropdown-trigger.active {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.filter-dropdown-trigger svg:first-child {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.filter-dropdown-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 320px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.filter-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


.calendar-picker-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.calendar-selectors {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.selector-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selector-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.date-select:hover {
    border-color: var(--accent-blue);
}

.date-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-select option {
    padding: 0.5rem;
}

.calendar-actions {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
}

.calendar-btn {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.clear-btn {
    background: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.clear-btn:hover {
    background: var(--bg-surface);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.apply-btn {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-yellow) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.apply-btn:active {
    transform: translateY(0);
}


.sort-wrapper {
    display: flex;
    align-items: center;
}

.btn-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-control:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-control svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}


.pinned-toggle-btn {
    display: none;
}

.announcement-board {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 1.5rem;
    align-items: start;
    text-align: left;
}


.announcement-categories {
    position: sticky;
    top: calc(var(--header-height) + 2.5rem);
    max-height: calc(100vh - var(--header-height) - 5rem);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--announcement-card-radius);
    box-shadow: var(--shadow-sm);
}


.announcement-categories::-webkit-scrollbar {
    width: 6px;
}

.announcement-categories::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-radius: 3px;
}

.announcement-categories::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.announcement-categories::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

.categories-header h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 1rem;
}

.category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-btn {
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.9rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--announcement-transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-btn:hover {
    background: var(--bg-body);
    border-color: var(--border-light);
}

.category-btn.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    font-weight: 600;
}

.category-btn .count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-body);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.category-btn.active .count {
    background: var(--accent-blue);
    color: white;
}


#announcements-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.announcements-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.announcement-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.card-header {
    padding: 12px 16px 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--bg-body);
}

.card-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}

.card-author {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.2;
}

.card-time {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}


.card-body {
    padding: 6px 16px 14px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-excerpt {
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
    margin: 0;
}

.card-excerpt.large-text {
    font-size: 22px;
    font-weight: 400;
    line-height: 1.4;
    padding: 8px 0 4px;
}


.see-more-btn {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    display: inline;
    margin-left: 4px;
    user-select: none;
}

.see-more-btn:hover {
    text-decoration: underline;
}


.image-grid {
    width: 100%;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--bg-body);
    display: grid;
    gap: 2px;
    margin-top: 16px;
}

.img-item {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            var(--bg-body) 0%,
            var(--border-light) 50%,
            var(--bg-body) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.img-item:has(img.img-loaded) {
    animation: none;
    background: var(--bg-body);
}

.img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-item img.img-loaded {
    opacity: 1;
}

.img-item:hover img.img-loaded {
    opacity: 0.96;
}


.grid-1 {
    display: block;
    height: auto;
    min-height: 240px;
    max-height: 650px;
}

.grid-1 .img-item img {
    height: auto;
    max-height: 650px;
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
    aspect-ratio: 3 / 2;
}

.grid-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 4 / 3;
}

.grid-3 .img-item:nth-child(1) {
    grid-row: 1 / 3;
}

.grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 4 / 3;
}

.grid-5-plus {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: 60% 40%;
    aspect-ratio: 1 / 1;
}

.grid-5-plus .img-item:nth-child(1) {
    grid-column: span 3;
    grid-row: 1;
}

.grid-5-plus .img-item:nth-child(2) {
    grid-column: span 3;
    grid-row: 1;
}

.grid-5-plus .img-item:nth-child(3) {
    grid-column: span 2;
    grid-row: 2;
}

.grid-5-plus .img-item:nth-child(4) {
    grid-column: span 2;
    grid-row: 2;
}

.grid-5-plus .img-item:nth-child(5) {
    grid-column: span 2;
    grid-row: 2;
}

.more-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 2rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
}


.card-tags {
    margin-top: 8px;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.95rem;
    color: var(--accent-blue);
    font-weight: 600;
}


/* ========================================
   SHARED POST EMBED (Facebook-style)
   ======================================== */

/* When card-body is followed by a shared post embed, reduce bottom gap */
.card-body.card-body--has-shared {
    padding-bottom: 6px;
}

.shared-post-embed {
    margin: 0 12px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-body);
    transition: border-color 0.2s;
}

.shared-post-embed:hover {
    border-color: color-mix(in srgb, var(--accent-blue) 60%, transparent);
}

.sp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 4px;
}

.sp-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
}

.sp-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.sp-author {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.sp-time {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 3px;
}

.sp-body {
    padding: 2px 10px 6px;
}

.sp-excerpt {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.45;
    white-space: pre-line;
    overflow-wrap: anywhere;
    margin: 0;
}

.sp-hashtags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    padding: 0 10px 6px;
}

.shared-post-embed .image-grid {
    margin-top: 2px;
    border-radius: 0;
}


#announcement-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
}



.video-item {
    position: relative;
}

.media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.video-item:hover .video-play-overlay {
    opacity: 1;
}


#lightbox-video {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-media {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    transition: opacity 0.3s;
}

.lightbox-content-wrapper {
    transition: opacity 0.3s;
}

.lightbox-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 100001;
    border: none;
    transition: background 0.2s;
}

.lightbox-close-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.lightbox-nav-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15%;
    display: flex;
    align-items: center;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: transparent;
    z-index: 100000;
    border: none;
    transition: background 0.2s;
}

.lightbox-nav-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

.lightbox-prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 20px;
}

.lightbox-next {
    right: 0;
    justify-content: flex-end;
    padding-right: 20px;
}


.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border: 2px dashed var(--border-light);
    border-radius: var(--announcement-card-radius);
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1rem;
}


.announcement-pinned {
    position: sticky;
    top: calc(var(--header-height) + 2.5rem);
}

.pinned-header {
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pinned-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pinned-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pinned-close-btn:hover {
    color: var(--text-main);
}

.announcement-pinned.hidden {
    display: none;
}

.pinned-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--announcement-card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pinned-card {
    padding: 1.25rem;
}

.pinned-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.pinned-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.75rem;
    display: block;
}

.pinned-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

.pinned-card .btn-text {
    color: var(--accent-blue);
    font-weight: 600;
    text-decoration: none;
    transition: var(--announcement-transition);
    display: inline-block;
    margin-top: 0.5rem;
}

.pinned-card .btn-text:hover {
    color: var(--accent-yellow);
}


.pagination {
    display: none;
}




@media (max-width: 1024px) {
    .announcements-container {
        padding-top: calc(var(--header-height) + 1.5rem);
    }


    .container {
        padding: 0 2rem;
    }

    .announcement-board {

        grid-template-columns: 1fr 300px;
        gap: 1.25rem;
    }


    .announcement-pinned {
        display: block;

    }


    .announcement-categories {
        grid-column: 1 / -1;
        position: sticky;
        top: var(--header-height);
        z-index: 50;
        background: var(--bg-body);
        border-bottom: 1px solid var(--border-light);
        width: calc(100% + 4rem);
        margin-left: -2rem;
        margin-right: -2rem;
        padding-top: 15px;
        padding-bottom: 15px;
        padding-left: 2rem;
        padding-right: 2rem;

        display: flex;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;


        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .announcement-categories::-webkit-scrollbar {
        display: none;
    }

    .categories-header {
        display: none;
    }

    .category-menu {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding-bottom: 0;
        width: max-content;
        padding-right: 1.5rem;
    }

    .category-btn {
        white-space: nowrap;
        padding: 0.4rem 1.1rem;
        font-size: 0.85rem;
        background: var(--bg-surface);
        border: 1px solid var(--border-light);
        flex-shrink: 0;
    }

    .category-btn:hover {
        transform: none;
    }

    .category-btn.active {
        border-color: var(--accent-blue);
    }
}


@media (max-width: 768px) {

    .container {
        padding: 0 1.25rem;
    }

    .announcements-container {
        padding-top: calc(var(--header-height) + 1.25rem);
    }

    .announcement-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .announcement-header .header-right {
        width: 100%;
        flex-direction: row;
        gap: 0.75rem;
    }

    .date-filter-dropdown {
        flex: 1;
    }

    .filter-dropdown-trigger {
        width: 100%;
        justify-content: space-between;
    }


    .filter-dropdown-trigger span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .filter-dropdown-menu {
        left: 0;
        right: auto;
        min-width: 280px;
        max-width: 90vw;
        z-index: 100;
    }

    .sort-wrapper {
        width: 100%;
    }

    .btn-control {
        width: 100%;
        justify-content: center;
    }

    .announcement-board {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        display: flex;
        flex-direction: column;
    }


    .announcement-categories {
        order: 1;
        position: sticky;
        top: var(--header-height);
        z-index: 50;
        background: var(--bg-body);
        border-top: none;
        border-bottom: 1px solid var(--border-light);
        border-left: none;
        border-right: none;
        width: calc(100% + 2.5rem);
        margin-left: -1.25rem;
        margin-right: -1.25rem;
        left: 0;

        padding-top: 15px;
        padding-bottom: 15px;
        padding-left: 0;
        padding-right: 0;

        display: flex;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;


        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .announcement-categories::-webkit-scrollbar {
        display: none;
    }


    .category-menu {
        gap: 0.5rem;
        padding-bottom: 0;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .category-btn {
        padding: 0.4rem 1.1rem;
        font-size: 0.85rem;
    }


    .pinned-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.75rem 1rem;
        background: var(--bg-surface);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        color: var(--text-main);
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        cursor: pointer;
        transition: all 0.2s;
        order: 2;
    }

    .pinned-toggle-btn.active {
        border-color: var(--accent-blue);
        color: var(--accent-blue);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        margin-bottom: 0;
        border-bottom: none;
    }

    .pinned-toggle-btn svg {
        transition: transform 0.3s;
    }

    .pinned-toggle-btn.active svg {
        transform: rotate(180deg);
    }

    .announcement-pinned {
        order: 3;
        display: none;
        position: static;
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .announcement-pinned.show {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    .pinned-content {

        border-radius: var(--announcement-card-radius);

    }

    .pinned-toggle-btn.active+.announcement-pinned .pinned-content {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-top: none;
    }

    .announcement-feed-container {
        order: 4;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .card-author-avatar {
        width: 40px;
        height: 40px;
    }

    .card-excerpt.large-text {
        font-size: 19px;
    }

    .grid-2 {
        aspect-ratio: 4 / 3;
    }

    .grid-3 {
        aspect-ratio: 1 / 1;
    }

    .grid-5-plus {
        aspect-ratio: 4 / 5;
    }
}


@media (max-width: 480px) {

    .container {
        padding: 0 1rem;
    }

    .announcements-container {
        padding-top: calc(60px + 1rem);
    }

    .filter-dropdown-trigger {
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }

    .btn-control {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }


    .announcement-card {
        border-left: none;
        border-right: none;
        border-radius: 0;
        margin-left: -1rem;
        margin-right: -1rem;
    }


    .announcement-categories {
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        padding-top: 12px;
        padding-bottom: 12px;
        border-top: none;
        border-left: none;
        border-right: none;
        top: 60px;
    }

    .category-menu {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 0;
    }


    .card-header {
        padding: 10px 12px;
    }

    .card-body {
        padding: 4px 12px 12px;
    }


    .card-author {
        font-size: 13px;
    }

    .card-time {
        font-size: 11px;
    }

    .card-title {
        font-size: 13px;
    }

    .card-excerpt {
        font-size: 13px;
    }

    .card-excerpt.large-text {
        font-size: 18px;
    }

    .card-author-avatar {
        width: 36px;
        height: 36px;
    }

    .card-image img {
        height: 200px;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }


    .tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
}


@media (max-width: 320px) {
    .container {
        padding: 0 0.75rem;
    }

    .announcements-container {
        padding-top: calc(60px + 0.75rem);
    }

    .announcement-header .header-left h1 {
        font-size: 1.5rem;
    }

    .filter-dropdown-trigger,
    .btn-control {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }

    .card-author-avatar {
        width: 36px;
        height: 36px;
    }

    .card-title {
        font-size: 1.1rem;
    }
}


.video-item {
    position: relative;
}

.media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.video-item:hover .video-play-overlay {
    opacity: 1;
}


#lightbox-video {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-media {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    transition: opacity 0.3s;
}

.lightbox-content-wrapper {
    transition: opacity 0.3s;
}

/* ========================================
   SMOOTH TRANSITIONS & ANIMATIONS
   ======================================== */

/* Global smooth transitions for all interactive elements */
.category-btn,
.filter-dropdown-trigger,
.btn-control,
.calendar-btn,
.announcement-card,
.img-item,
.see-more-btn,
.pinned-toggle-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade-in animation for newly loaded posts */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcement-card {
    animation: fadeInUp 0.3s ease-out forwards;
}

/* Stagger animation for multiple cards */
.announcement-card:nth-child(1) {
    animation-delay: 0s;
}

.announcement-card:nth-child(2) {
    animation-delay: 0.1s;
}

.announcement-card:nth-child(3) {
    animation-delay: 0.2s;
}


@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* ========================================
   PULL TO REFRESH (Mobile)
   ======================================== */

.pull-to-refresh-indicator {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

.pull-to-refresh-indicator.visible {
    transform: translateX(-50%) scale(1);
}

.pull-to-refresh-indicator.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: translateX(-50%) rotate(0deg);
    }

    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

.pull-to-refresh-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-blue);
    transition: transform 0.3s;
}


/* ========================================
   ACTIVE FILTER INDICATORS
   ======================================== */

.filter-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.filter-dropdown-trigger,
.date-filter-dropdown {
    position: relative;
}

.active-filters-summary {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    animation: fadeInUp 0.3s ease-out;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-full);
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 600;
    animation: fadeInUp 0.3s ease-out;
}

.filter-chip-remove {
    cursor: pointer;
    padding: 0.1rem 0.2rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.filter-chip-remove:hover {
    background: var(--accent-blue);
    color: white;
}


/* ========================================
   IMPROVED EMPTY STATES
   ======================================== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border: 2px dashed var(--border-light);
    border-radius: var(--announcement-card-radius);
    animation: fadeInUp 0.4s ease-out;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    opacity: 0.7;
}

.empty-state-icon svg {
    width: 100%;
    height: 100%;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
}

.empty-state-btn.primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-yellow) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.empty-state-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.empty-state-btn.secondary {
    background: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.empty-state-btn.secondary:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}


/* ========================================
   LOADING STATES
   ======================================== */

.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


/* ========================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .pull-to-refresh-indicator {
        top: calc(60px + 10px);
    }

    .filter-badge {
        top: -4px;
        right: -4px;
        font-size: 0.65rem;
        padding: 0.15rem 0.35rem;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-state-icon {
        width: 80px;
        height: 80px;
    }

    .empty-state h3 {
        font-size: 1.25rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }
}