/* Base Styles */
.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Desktop Grid View */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
}

.news-image {
    height: 180px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 15px;
}

.news-source {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: #555;
}

.source-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.news-date {
    color: #777;
}

.news-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
}

.news-title a {
    color: #1a0dab;
    text-decoration: none;
}

.news-title a:hover {
    text-decoration: underline;
}

/* Tabs */
.results-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin: 15px 0;
}

.tab {
    padding: 10px 15px;
    cursor: pointer;
    color: #5f6368;
    font-size: 14px;
}

.tab.active {
    color: #1a73e8;
    border-bottom: 2px solid #1a73e8;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 5px;
}

.page-number, .page-next {
    padding: 8px 15px;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
    color: #1a73e8;
    cursor: pointer;
}

.page-number.active {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

/* Mobile List View */
@media (max-width: 500px) {
    .search-container {
        padding: 0;
    }
    
    .news-grid {
        display: none;
    }
    
    .mobile-news-view {
        display: block;
    }
    
    .results-tabs {
        padding: 0 15px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-news-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background: #fff;
        border-bottom: 1px solid #ecedef;
    }
    
    .mobile-news-header h2 {
        font-size: 20px;
        margin: 0;
        color: #202124;
    }
    
    .view-options {
        color: #1a73e8;
        font-size: 14px;
    }
    
    .results-count-mobile {
        color: #70757a;
        font-size: 14px;
        padding: 0 15px;
        margin: 10px 0;
    }
    
    .mobile-news-item {
        padding: 15px;
        background: #fff;
        border-bottom: 1px solid #ecedef;
    }
    
    .mobile-news-image {
        width: 100%;
        height: 180px;
        overflow: hidden;
        margin-bottom: 10px;
        border-radius: 4px;
    }
    
    .mobile-news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .mobile-news-title {
        font-size: 16px;
        margin: 0 0 5px 0;
        line-height: 1.4;
    }
    
    .mobile-news-title a {
        color: #202124;
        text-decoration: none;
    }
    
    .mobile-news-source {
        display: flex;
        align-items: center;
        font-size: 12px;
        color: #5f6368;
    }
    
    .mobile-source-icon {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }
    
    .pagination {
        padding: 0 15px;
        margin: 20px 0;
    }
}
