   /* Core Variables */
   :root {
    --primary: #FED829;
    --secondary: #0041B1;
    --accent: #CE1126;
    --dark: #1A1A2E;
    --light: #F7F7F9;
    --gray: #6E7275;
    --white: #FFFFFF;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 10px;
    --transition: all 0.3s ease;
    --text-colot: white;
    --card-bg: white;
    --filter-bg: #eee;
  }

  [data-bs-theme="dark"] {
    --primary: #FED829;
    --secondary: #0041B1;
    --accent: #CE1126;
    --dark: #1A1A2E;
    --light: #F7F7F9;
    --gray: #6E7275;
    --white: rgb(46, 51, 56);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 10px;
    --transition: all 0.3s ease;
    --text-color: white;
    --card-bg: rgb(26, 38, 51);
    --filter-bg: rgb(50, 50, 50);
}
  /* Main layout */
  .search-page-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.filters-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.search-results-container {
    flex-grow: 1;
}

/* Filters styling */
.filter-section {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.filter-header {
    background-color: var(--secondary);
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-header .toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
    color: white;
}

.filter-header span{
    color: white;
}

.filter-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.filter-content {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.filter-search {
    margin-bottom: 0.75rem;
}

.filter-search input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.filter-option label {
    margin-left: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.filter-option-count {
    background-color: var(--filter-bg);
    font-size: 0.8rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    color: #666;
}

.date-range {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.date-range input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.search-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-toggle button {
    background-color: var(--gray);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-toggle button.active {
    background-color: #0041B1;
    color: white;
    border-color: #0041B1;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

/* Results list view */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Results list view */
.publication-item {
    margin-bottom: 2rem;
}

/* Index Terms Tags Styling */
.publication-tags {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: var(--primary);
    border-radius: 16px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: #666;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: #e0e0e0;
    color: #333;
}

.search-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination-button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
}

.pagination-button.active {
    background-color: #0041B1;
    color: white;
    border-color: #0041B1;
}

.pagination-button:hover:not(.active) {
    background-color: #f5f5f5;
}

/* Applied filters */
.applied-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-tag {
    background-color: #0041B1;
    color: white;
    border-radius: 16px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-tag-remove {
    cursor: pointer;
    font-weight: bold;
}

.clear-all-filters {
    color: #0041B1;
    font-size: 0.75rem;
    text-decoration: underline;
    cursor: pointer;
}

/* Add these styles to your existing search.css file */

/* Grid Layout Updates for News Cards */
.publications-grid.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* News cards in search grid */
.publications-grid .featured-card.news-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--card-bg);
    transition: var(--transition);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    margin-bottom: 0; /* Remove bottom margin in grid */
}

.publications-grid .featured-card.news-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 65, 177, 0.15);
    transform: translateY(-3px);
}

.publications-grid .featured-card.news-card .featured-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100%;
}

.publications-grid .featured-card.news-card .featured-image {
    display: none;
}

.publications-grid .featured-card.news-card .featured-title-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.75rem 0;
    line-height: 1.4;
    color: var(--text-color);
    height: auto;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: -webkit-box;
}

.publications-grid .featured-card.news-card .featured-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.5rem 0;
    flex: 1;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publications-grid .featured-card.news-card .featured-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.publications-grid .featured-card.news-card .featured-meta span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--filter-bg);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.publications-grid .featured-card.news-card .featured-author {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-top: auto;
    font-weight: 500;
}

/* List view for news clippings */
.publication-item.news-clipping-item {
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--card-bg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.publication-content.news-clipping-content {
    width: 100%;
    padding: 1.5rem;
    background-color: var(--card-bg);
}

.news-clipping-content .publication-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0.75rem 0;
    color: var(--text-color);
}

.news-clipping-content .publication-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0.75rem 0;
}

.news-clipping-content .publication-meta {
    margin-bottom: 0.75rem;
}

.news-clipping-content .publication-footer {
    margin-top: 1rem;
}

/* Remove publication image for clippings */
.news-clipping-item .publication-image {
    display: none;
}

/* List view specific adjustments */
.publications-list .news-clipping-item:last-child {
    margin-bottom: 0;
}

/* Tag styling for subject terms in search */
.news-clipping-content .publication-tags,
.featured-card.news-card .publication-tags {
    margin: 0.75rem 0;
}

.news-clipping-content .tag,
.featured-card.news-card .tag {
    background-color: var(--primary);
    border-radius: 16px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: var(--dark);
    transition: all 0.2s ease;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.news-clipping-content .tag:hover,
.featured-card.news-card .tag:hover {
    background-color: var(--secondary);
    color: var(--white);
}

/* Clear button styling for search */
.clear-search-btn {
    position: absolute;
    right: 12px;
    top: 28%;
    background: none;
    border: none;
    color: #999;
    font-size: 2.5rem;
    cursor: pointer;
    display: none;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    z-index: 5;
}

.clear-search-btn:hover {
    color: #333;
}

/* Dark theme adjustments */
[data-bs-theme="dark"] .publications-grid .featured-card.news-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .publications-grid .featured-card.news-card:hover {
    border-color: var(--primary);
}

[data-bs-theme="dark"] .news-clipping-content {
    background-color: var(--card-bg);
}

/* Responsive Design for News Search */
@media (max-width: 768px) {
    .publications-grid.news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .publications-grid .featured-card.news-card {
        padding: 1rem;
        min-height: 200px;
    }
    
    .publications-grid .featured-card.news-card .featured-title-text {
        font-size: 1rem;
    }
    
    .publications-grid .featured-card.news-card .featured-summary {
        font-size: 0.85rem;
    }
    
    .news-clipping-content {
        padding: 1rem;
    }
    
    .news-clipping-item {
        margin-bottom: 1rem;
    }
}