/* Newsroom Block Styles */

#newsroom {
    width: 100%;
    position: relative;
}

.newsroom-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 2;
    position: relative;
}

/* Section A: Featured Article */
.section-a {
}

.section-a-featured {
    display: flex;
    gap: 30px;
    align-items: stretch;
    background: #f8f9fa;
    overflow: hidden;
    min-height: 250px;
}

.section-a .featured-image {
    flex: 0 0 420px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 250px;
}

.section-a .featured-content {
    flex: 1;
    padding: 30px 0; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.section-a .featured-meta {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.section-a .featured-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: var(--mn8-orange);
}

.section-a .featured-button {
    margin-top: 8px;
}

/* Category Buttons & Search Bar */
.newsroom-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0px;
}

.category-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    border: 2px solid var(--dark-gray-2);
    background: white;
    color: var(--dark-gray-2);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.5s ease;
    white-space: nowrap;
}

.search-form { display: flex; }

.category-btn:hover {
    border-color: var(--dark-gray-2);
    background: var(--dark-gray-2);
}

.category-btn.active {
    background:var(--mn8-orange);
    border-color: var(--mn8-orange);
    color: white;
}

.category-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.newsroom-search {
    flex: 0 0 auto;
    border: 1px solid var(--mn8-orange);
  border-radius: 25px;
}

#newsroom .search-form {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--mn8-orange);
    border-radius: 24px;
    padding: 4px;
    transition: border-color 0.2s ease;
}

.search-form:focus-within {
    border-color: var(--mn8-orange);
}

.search-input {
    border: none;
    outline: none;
    padding: 8px 16px;
    font-size: 14px;
    background: transparent;
    width: 200px;
    color: var(--mn8-orange);
}

.search-input::placeholder {
    color: var(--mn8-orange);
}

.search-submit {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit:hover {
    color: #333;
}

.search-submit svg {
    width: 16px;
    height: 16px;
}

/* Section B: Cards Grid */
.section-b {
    margin-bottom: 20px;
}

/* Section C: Text Snippets Grid */
.section-c {
    margin-bottom: 20px;
}

/* Hide Section C when empty */
.section-c .section-c-posts:empty {
    display: none;
}

.cards-row {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.section-b.columns-3 .cards-row {
    grid-template-columns: 1fr 1fr 1fr;
}

.section-b.columns-4 .cards-row {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.cards-row:last-child {
    margin-bottom: 0;
}



/* Section C: 2-Column Snippet Layout */
.section-c .section-c-posts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 40px;
}

/* No Posts Message */
.no-posts-message {
    grid-column: 1 / -1; /* Span full width in grid */
    text-align: center;
    padding: 40px 20px;
    color: var(--medium-gray);
    font-style: italic;
}

.section-b .no-posts-message {
    width: 100%;
    margin: 40px 0;
}

.news-snippet {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 18px 20px 0;
    border-top: 3px solid var(--pale-gray-2);
}

.snippet-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.snippet-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.snippet-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--charcoal);
    margin: 0;
}

.snippet-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: var(--dark-gray-1);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.snippet-button {
    margin-top: 8px;
}


.news-card {
    background: white;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    border-top:4px solid var(--mn8-orange);
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 146px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-meta {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.card-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.card-button,
.featured-button {
    margin-top: auto;
}

.cta {
    display: inline-block;
}


/* Load More Section */
.load-more-container {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
}

.loading-spinner {
    font-size: 16px;
    color: #666;
}

/* Loading States */
#newsroom.loading {
    opacity: 0.7;
    pointer-events: none;
}

#newsroom.loading .newsroom-content {
    position: relative;
}

#newsroom.loading .newsroom-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Error Handling */
.newsroom-error {
    margin-bottom: 20px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 4px;
    border: 1px solid #fcc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.error-dismiss {
    background: none;
    border: none;
    color: #c33;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .section-a .featured-image {
        flex: 0 0 400px;
    }
    
    .section-a .featured-content {
        padding: 30px;
    }
    
    .cards-row {
        gap: 20px;
    }
}

@media (max-width: 980px) {
    .newsroom-filters {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .category-buttons {
        justify-content: center;
    }
    
    .newsroom-search {
        align-self: center;
    }
    
    /* 3 columns become 2 on tablets */
    .section-b.columns-3 .cards-row {
        flex-wrap: wrap;
    }
    
    
    /* 4 columns become 2 on tablets */
    .section-b.columns-4 .cards-row {
        flex-wrap: wrap;
    }
    
    
    /* Section C: Single column on tablet */
    .section-c .section-c-posts {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {

    .cards-row { grid-template-columns: 1fr 1fr !important; }
    .newsroom-content {
        gap: 30px;
    }
    
    /* Stack featured article */
    .section-a-featured {
        flex-direction: column;
        min-height: auto;
    }
    
    .section-a .featured-image {
        flex: none;
        height: 240px;
        width: 100%;
    }
    
    .section-a .featured-content {
        padding: 24px;
    }
    
    .section-a .featured-title {
        font-size: 24px;
    }
    
    /* Single column cards on mobile */
    .cards-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .news-card {
        max-width: 100%;
    }
    
    /* Section C: Single column on mobile */
    .section-c .section-c-posts {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .snippet-title {
        font-size: 16px;
    }
    
   
    
    .category-buttons {
        gap: 8px;
    }
    
    .category-btn {
        font-size: 13px;
        padding: 6px 12px;
    }

    .newsroom-search, .newsroom-search .searchinput { width: 100%; }
}

@media (max-width: 545px) {
    .cards-row { grid-template-columns: 1fr !important; }
    .section-a .featured-content {
        padding: 20px;
        gap: 12px;
    }
    
    .section-a .featured-title {
        font-size: 20px;
    }
    
    .card-content {
        padding: 16px;
        gap: 10px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .newsroom-filters {
        padding: 16px 0;
    }
    
    .search-input {
        width: 100%;
    }
} 