.post-type-archive-announcements #main-content .ctm_course_details {
    background: #efefef;
}

.agency-announcements-wrap {
    width: 100%;
    margin-bottom: 40px;
    font-family: inherit;
    margin-top: 20px;
    /* background-color: #e4e0e7; */
}

.announcements-title {
    font-family: "Tobias", sans-serif;
    font-size: 1.6rem;
    line-height: 2rem;
    font-weight: 600;
    color: #333;
}

.view-all-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}

.view-all-link:hover {
    color: #000;
}

.announcements-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.announcement-row {
    width: 100%;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    /* Allow normal tiles to wrap if more than 3 */
}

.row-full {
    flex-direction: column;
}

/* Announcements Tile - Base Styling */
.announcements-tile {
    background: #ffffff;
    /* Light grey backdrop from mockup */
    border-radius: 16px;
    padding: 24px;
    border: none;
    transition: box-shadow 0.3s ease;
    margin-bottom: 0;
    /* Override default post margins */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.announcements-tile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.announcements-tile.normal-width {
    flex: 0 0 calc(33.333% - 13.5px);
    max-width: calc(33.333% - 13.5px);
    width: calc(33.333% - 13.5px);
    min-width: 250px;
}

.announcements-tile.full-width {
    flex: 0 0 100%;
    width: 100%;
}

.tile-inner {
    display: grid;
    gap: 15px 24px;
    flex: 1;
    /* Fill the tile height */
}

/* Full Width (Top Item) Layout */
.full-width .tile-inner {
    grid-template-columns: 280px 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "img title"
        "img excerpt"
        "img footer";
}

/* If no image, title spans full line for full-width */
.full-width.no-image .tile-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "title"
        "excerpt"
        "footer";
}

.full-width.no-image .tile-image {
    display: none;
}

/* Normal Width (Bottom Items) Layout */
.normal-width .tile-inner {
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
        "img title"
        "img excerpt"
        "spacer spacer"
        "footer footer";
    gap: 12px 15px;
}

/* If no image, title spans full line */
.normal-width.no-image .tile-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
        "title"
        "excerpt"
        "spacer"
        "footer";
}

.normal-width.no-image .tile-image {
    display: none;
}

.normal-width.no-image .tile-image+.tile-title {
    min-height: 60px;
}

.tile-image {
    grid-area: img;
    overflow: hidden;
    border-radius: 12px;
}

.full-width .tile-image {
    height: 180px;
}

.normal-width .tile-image {
    height: 60px;
    width: 60px;
}

.tile-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.tile-title {
    grid-area: title;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 0;
    color: #1a1a1a;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.normal-width .tile-title {
    font-size: 17px;
    align-self: flex-start;
    max-width: 100%;
}

.tile-excerpt {
    grid-area: excerpt;
    max-width: 100%;
}

.tile-excerpt p {
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.5;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}


.tile-footer {
    grid-area: footer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more-link {
    color: #EB5A3E;
    font-weight: 500;
    text-decoration: underline;
    font-size: 14px;
}

.tile-date {
    font-size: 12px;
    color: #8c8c8c;
}

.agency-announcements-wrap .announcements-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center !important;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 991px) {

    .announcements-grid,
    .announcement-row {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .announcements-tile.normal-width,
    .announcements-tile.full-width,
    .row-normal .announcements-tile.normal-width,
    .row-full .announcements-tile.full-width {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
    }

    /* Force all items into the same layout */
    .tile-inner,
    .full-width .tile-inner,
    .normal-width .tile-inner,
    .normal-width.no-image .tile-inner {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px;
    }

    .tile-image,
    .full-width .tile-image,
    .normal-width .tile-image {
        grid-area: auto;
        height: 180px !important;
        width: 100% !important;
        flex: 0 0 auto;
        display: block !important;
    }

    .tile-title {
        grid-area: auto;
        font-size: 18px;
        align-self: stretch !important;
        max-width: 100%;
        width: 100%;
    }

    .tile-excerpt {
        display: block !important;
        /* Show excerpt on mobile for consistent look */
        grid-area: auto;
    }

    .tile-footer {
        grid-area: auto;
        margin-top: auto;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
    }

    .announcements-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .post-type-archive-announcements .agency-announcements-wrap {
        /* padding: 0 15px !important; */
        margin-top: 75px;
    }

    /* 
    body.home .container-fluid>.container.ctm_section_wrapper {
        padding-inline: 4px;
    } */

    body.single .new_details_main_wrap_news,
    body.single-announcements .new_details_main_wrap_announcements {
        padding-block: 50px 113px !important;
    }
}

@media screen and (max-width: 767px) {

    .tile-excerpt p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

}

/* ==========================================================================
   Announcements Archive Page Styles
   ========================================================================== */





/* Load More Button Styling */
.load-more-wrapper {
    margin-top: 50px;
    margin-bottom: 80px;
}

/* News-style Load More Button Styling */
.news_load_more {
    color: #000 !important;
    background-color: transparent !important;
    transition: none !important;
}

.news_load_more:hover {
    color: #000 !important;
    background-color: transparent !important;
    text-decoration: none !important;
}

#load-more-spinner {
    width: 3rem;
    height: 3rem;
    /* margin: 20px auto; */
}

/* Ensure consistent spacing in archive grid */
.agency-announcements-archive .announcements-grid {
    gap: 20px;
}

/* ==========================================================================
   Announcements Single Page Styles
   ========================================================================== */

.announcements-single-content .entry-title {
    font-size: 32px !important;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 40px !important;
}

.announcements-featured-image {
    float: left;
    margin: 0 30px 20px 0;
    max-height: 350px;
    border-radius: 12px;
    overflow: hidden;
}

.announcements-featured-image img {
    max-height: 350px;
    width: auto;
    object-fit: contain;
    display: block;
}

.entry-content-wrap.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.announcements-single-content .entry-content {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    text-align: justify;
}

/* Single Page Mobile Adjustments */
@media (max-width: 767px) {

    .announcements-single-content .new_details_main_wrap_announcements,
    .anchor-announcements-single .new_details_main_wrap {
        padding: 0 15px !important;
    }

    .announcements-featured-image {
        float: none;
        margin: 0 0 25px 0;
        width: 100%;
        max-height: none;
    }

    .announcements-featured-image img {
        width: 100%;
        height: auto;
        max-height: 350px;
        object-fit: cover;
        border-radius: 12px;
    }

    .announcements-single-content .entry-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .announcements-single-content .entry-content {
        font-size: 15px;
        line-height: 1.6;
        text-align: justify;
    }

    body.single .entry-content-wrap .entry-content img {
        height: auto !important;
    }
}