@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

/* Layout Container */
.updates-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Inter', sans-serif;
}

.page-title {
    text-align: center;
    color: #800000;
    margin-bottom: 40px;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Search + Filter Bar */
.search-bar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    width: 100%;
    max-width: 700px;
    gap: 10px;
}

.search-input {
    flex-grow: 1;
    padding: 12px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #800000;
}

.type-select {
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    background: #fff;
    color: #333;
    outline: none;
    cursor: pointer;
}

.search-btn {
    padding: 12px 24px;
    background: #800000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background: #650000;
}

.search-results-note {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.search-results-note a {
    color: #800000;
    font-weight: 600;
    text-decoration: none;
}

/* THE 3-COLUMN GRID */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    grid-auto-rows: 1fr;
}

/* Card Styling */
.update-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.update-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.card-image-wrapper {
    width: 100%;
    height: 200px;
    background-color: #f4f4f4;
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #800000;
    color: #fff;
    font-weight: bold;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.badge-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.badge-tag.news { background: #d1ecf1; color: #0c5460; }
.badge-tag.announcement { background: #fff3cd; color: #856404; }
.badge-tag.feature { background: #e2d9f3; color: #4b2e83; }
.badge-tag.column { background: #fde2e4; color: #9d174d; }
.badge-tag.literary { background: #ffe5d0; color: #9a3412; }
.badge-tag.editorial { background: #dbeafe; color: #1e3a8a; }
.badge-tag.advisory { background: #d4edda; color: #155724; }

.card-headline {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 3.4em;
}

.card-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more-link {
    color: #800000;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
}

/* Pagination Styling */
.pagination-container {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-link {
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.page-link:hover {
    border-color: #800000;
    color: #800000;
    background: #fef2f2;
}

.page-link.active {
    background: #800000;
    color: #fff;
    border-color: #800000;
}

.page-ellipsis {
    padding: 10px 6px;
    color: #999;
    font-weight: 600;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .updates-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
    .updates-grid { grid-template-columns: 1fr; }
    .search-bar { flex-wrap: wrap; }
}